From 233a5bdbb7105b149370fc3709ac08ea65c3b07d Mon Sep 17 00:00:00 2001 From: Oleg Kalnichevski Date: Sat, 5 Nov 2022 15:17:13 +0100 Subject: [PATCH] Use docker-compose to start compatibility test containers --- httpclient5-testing/docker/BUILDING.txt | 18 ++++++----- httpclient5-testing/docker/docker-compose.yml | 32 +++++++++++++++++++ 2 files changed, 42 insertions(+), 8 deletions(-) create mode 100644 httpclient5-testing/docker/docker-compose.yml diff --git a/httpclient5-testing/docker/BUILDING.txt b/httpclient5-testing/docker/BUILDING.txt index f898b8257..419a61d2e 100644 --- a/httpclient5-testing/docker/BUILDING.txt +++ b/httpclient5-testing/docker/BUILDING.txt @@ -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) diff --git a/httpclient5-testing/docker/docker-compose.yml b/httpclient5-testing/docker/docker-compose.yml new file mode 100644 index 000000000..d04c5e8b1 --- /dev/null +++ b/httpclient5-testing/docker/docker-compose.yml @@ -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" \ No newline at end of file