You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hc.apache.org by ol...@apache.org on 2022/11/12 16:48:35 UTC
[httpcomponents-core] branch master updated: Use docker-compose to start compatibility test containers
This is an automated email from the ASF dual-hosted git repository.
olegk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/httpcomponents-core.git
The following commit(s) were added to refs/heads/master by this push:
new a6b4e0738 Use docker-compose to start compatibility test containers
a6b4e0738 is described below
commit a6b4e07384ff68dfe0a0a64b2bd12b993813e2dc
Author: Oleg Kalnichevski <ol...@apache.org>
AuthorDate: Sat Nov 12 17:45:07 2022 +0100
Use docker-compose to start compatibility test containers
---
httpcore5-testing/docker-compose.yml | 33 +++++++++++++++++++++++++++++++++
httpcore5-testing/docker/BUILDING.txt | 31 ++++++++++++++++++-------------
2 files changed, 51 insertions(+), 13 deletions(-)
diff --git a/httpcore5-testing/docker-compose.yml b/httpcore5-testing/docker-compose.yml
new file mode 100644
index 000000000..2162cb101
--- /dev/null
+++ b/httpcore5-testing/docker-compose.yml
@@ -0,0 +1,33 @@
+# 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-hc-tests-httpd"
+ image: "hc-tests-httpd:latest"
+ ports:
+ - "8080:80"
+ test-nginx:
+ container_name: "my-hc-tests-nginx"
+ image: "hc-tests-nginx:latest"
+ ports:
+ - "8081:80"
+ test-httpbin:
+ container_name: "my-hc-tests-httpbin"
+ image: "hc-tests-httpbin:latest"
+ ports:
+ - "8082:80"
diff --git a/httpcore5-testing/docker/BUILDING.txt b/httpcore5-testing/docker/BUILDING.txt
index 0daf38c2e..072dad88c 100644
--- a/httpcore5-testing/docker/BUILDING.txt
+++ b/httpcore5-testing/docker/BUILDING.txt
@@ -1,26 +1,31 @@
Building Docker containers for compatibility tests
========================================================
-Remark: Docker containers have been developed and tested with Docker version 19.03.8, build afacb8b7f0
-on Ubuntu 20.04
-
Remark: omit sudo command if executing as root
+= Build Apache HTTPD image
+---
+sudo docker build -t hc-tests-httpd apache-httpd
---
-cd docker/apache-httpd
-sudo docker build -t hc-tests-httpd .
-sudo docker run --name my-hc-tests-httpd -p 0.0.0.0:8080:80 -d hc-tests-httpd:latest
-cd docker/nginx
-sudo docker build -t hc-tests-nginx .
-sudo docker run --name my-hc-tests-nginx -p 0.0.0.0:8081:80 -d hc-tests-nginx:latest
+= Build Nginx image
+---
+sudo docker build -t hc-tests-nginx nginx
+---
-cd docker/httpbin
-sudo docker build -t hc-tests-httpbin .
-sudo docker run --name my-hc-tests-httpbin -p 0.0.0.0:8082:80 -d hc-tests-httpbin:latest
+= Build HTTPBIN image
+---
+sudo docker build -t hc-tests-httpbin httpbin
+//sudo docker run --name my-hc-tests-httpbin -p 0.0.0.0:8082:80 -d
+---
+
+= Start containers
+
+---
+sudo docker-compose up
---
-Execute
+= Execute H2 compatibility tests
---
H2CompatibilityTest http://localhost:8080 APACHE-HTTPD