From 0c404fd6f34c7ca75400324e95e44842152bdd87 Mon Sep 17 00:00:00 2001 From: Maurice Kalinowski Date: Wed, 6 Feb 2019 13:12:35 +0100 Subject: [PATCH] Add image layer on windows The docker-compose files were trying to use volume sharing, which is not supported on Windows in conjunction with docker-machine. Hence create a separate layer on Windows, which copies the configuration files to the target. Change-Id: Ifeacc56198ffc8fb2eb31c14ab91334e22e916f5 Reviewed-by: Maurice Kalinowski Reviewed-by: Edward Welbourne --- tests/testserver/Dockerfile | 11 +++++ .../testserver/docker-compose-for-windows.yml | 45 ++++++++++--------- 2 files changed, 36 insertions(+), 20 deletions(-) create mode 100644 tests/testserver/Dockerfile diff --git a/tests/testserver/Dockerfile b/tests/testserver/Dockerfile new file mode 100644 index 0000000000..a4db873a5d --- /dev/null +++ b/tests/testserver/Dockerfile @@ -0,0 +1,11 @@ +# This Dockerfile is used on windows as volume sharing / mounting does not work in conjunction +# docker-machine. Windows Update 1809 might solve some of those issues when using docker0 +# network switch, but nothing has been reported in regards to the combination with docker-machine. + +ARG provisioningImage +FROM $provisioningImage + +# Common is used for all test images so far, no need for a variable +COPY ./common /common +ARG servicedir +COPY $servicedir /service diff --git a/tests/testserver/docker-compose-for-windows.yml b/tests/testserver/docker-compose-for-windows.yml index aa610dfb88..4867413361 100644 --- a/tests/testserver/docker-compose-for-windows.yml +++ b/tests/testserver/docker-compose-for-windows.yml @@ -12,12 +12,13 @@ version: '3.4' services: apache2: - image: qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13 container_name: qt-test-server-apache2 domainname: ${TEST_DOMAIN} - volumes: - - ./common:/common:ro - - ./apache2:/service:ro + build: + context: . + args: + provisioningImage: qt-test-server-apache2:537fe302f61851d1663f41495230d8e3554a4a13 + servicedir: ./apache2 entrypoint: common/startup.sh command: [common/ssl.sh, service/apache2.sh] network_mode: "host" @@ -28,14 +29,15 @@ services: - test_cert="qt-test-server-host-network-cacert.pem" squid: - image: qt-test-server-squid:9c32f41b19aca3d778733c4d8fb0ecc5955e893c container_name: qt-test-server-squid domainname: ${TEST_DOMAIN} depends_on: - apache2 - volumes: - - ./common:/common:ro - - ./squid:/service:ro + build: + context: . + args: + provisioningImage: qt-test-server-squid:9c32f41b19aca3d778733c4d8fb0ecc5955e893c + servicedir: ./squid entrypoint: common/startup.sh command: service/squid.sh network_mode: "host" @@ -45,12 +47,13 @@ services: - test_domain=${TEST_DOMAIN} vsftpd: - image: qt-test-server-vsftpd:f3a9c8d793a77cc007c0e4e481bec01f9e3eeb7e container_name: qt-test-server-vsftpd domainname: ${TEST_DOMAIN} - volumes: - - ./common:/common:ro - - ./vsftpd:/service:ro + build: + context: . + args: + provisioningImage: qt-test-server-vsftpd:f3a9c8d793a77cc007c0e4e481bec01f9e3eeb7e + servicedir: ./vsftpd entrypoint: common/startup.sh command: service/vsftpd.sh network_mode: "host" @@ -60,14 +63,15 @@ services: - test_domain=${TEST_DOMAIN} ftp-proxy: - image: qt-test-server-ftp-proxy:d7de8b28392d173db512a558ccc84ead8bece2ae container_name: qt-test-server-ftp-proxy domainname: ${TEST_DOMAIN} depends_on: - vsftpd - volumes: - - ./common:/common:ro - - ./ftp-proxy:/service:ro + build: + context: . + args: + provisioningImage: qt-test-server-ftp-proxy:d7de8b28392d173db512a558ccc84ead8bece2ae + servicedir: ./ftp-proxy entrypoint: common/startup.sh command: service/ftp-proxy.sh network_mode: "host" @@ -77,16 +81,17 @@ services: - test_domain=${TEST_DOMAIN} danted: - image: qt-test-server-danted:35607f9b790524cf9690c7d12a9a401696b7b6b5 container_name: qt-test-server-danted domainname: ${TEST_DOMAIN} depends_on: - apache2 - vsftpd - ftp-proxy - volumes: - - ./common:/common:ro - - ./danted:/service:ro + build: + context: . + args: + provisioningImage: qt-test-server-danted:35607f9b790524cf9690c7d12a9a401696b7b6b5 + servicedir: ./danted entrypoint: common/startup.sh command: service/danted.sh network_mode: "host"