Skip to content

Commit

Permalink
Use docker-compose to start compatibility test containers
Browse files Browse the repository at this point in the history
  • Loading branch information
ok2c committed Nov 5, 2022
1 parent d76d27b commit 233a5bd
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 8 deletions.
18 changes: 10 additions & 8 deletions httpclient5-testing/docker/BUILDING.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
Building Docker containers for compatibility tests
========================================================

= Apache HTTPD 2.4 container
= Apache HTTPD 2.4 image

Remark: omit sudo command if executing as root
---
cd apache-httpd
sudo docker build -t httpclient-tests-httpd .
sudo docker run --name my-httpclient-tests-httpd -p 0.0.0.0:8080:8080 -p 0.0.0.0:8443:8443 -d httpclient-tests-httpd:latest
sudo docker build -t httpclient-tests-httpd apache-httpd
---

= Squid 3.3 container
= Squid 3.3 image

Remark: omit sudo command if executing as root
---
cd squid
sudo docker build -t httpclient-tests-squid .
sudo docker run --name my-httpclient-tests-squid --link my-httpclient-tests-httpd:test-httpd -p 0.0.0.0:8888:8888 -p 0.0.0.0:8889:8889 -d httpclient-tests-squid:latest
sudo docker build -t httpclient-tests-squid squid
---

= Start containers

---
sudo docker-compose up
---

= SSL key / cert material (optional)
Expand Down
32 changes: 32 additions & 0 deletions httpclient5-testing/docker/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

version: '3.5'

services:
test-httpd:
container_name: "my-httpclient-tests-httpd"
image: "httpclient-tests-httpd:latest"
ports:
- "8080:8080"
- "8443:8443"
test-squid:
container_name: "my-httpclient-tests-squid"
image: "httpclient-tests-squid:latest"
ports:
- "8888:8888"
- "8889:8889"
links:
- "test-httpd"

0 comments on commit 233a5bd

Please sign in to comment.