From 8e6a2a4f3c813fb0ef11b01dbdce3d021c68dc48 Mon Sep 17 00:00:00 2001 From: Valentino Lauciani Date: Thu, 13 Feb 2020 23:24:07 +0100 Subject: [PATCH] Update docker-in-docker (dind) - not working with 18.09+ version --- docker-compose.yml | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 79c31cc6..2d0c750f 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -49,7 +49,7 @@ volumes: driver: ${VOLUMES_DRIVER} graylog: driver: ${VOLUMES_DRIVER} - dind: + docker-in-docker: driver: ${VOLUMES_DRIVER} services: @@ -154,7 +154,10 @@ services: tty: true environment: - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} - - DOCKER_HOST=tcp://docker-in-docker:2375 + - DOCKER_HOST=tcp://docker-in-docker:2376 + - DOCKER_TLS_VERIFY=1 + - DOCKER_TLS_CERTDIR=/certs + - DOCKER_CERT_PATH=/certs/client networks: - frontend - backend @@ -230,13 +233,17 @@ services: volumes: - ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG} + - docker-in-docker:/certs/client expose: - "9000" extra_hosts: - "dockerhost:${DOCKER_HOST_IP}" environment: - PHP_IDE_CONFIG=${PHP_IDE_CONFIG} - - DOCKER_HOST=tcp://docker-in-docker:2375 + - DOCKER_HOST=tcp://docker-in-docker:2376 + - DOCKER_TLS_VERIFY=1 + - DOCKER_TLS_CERTDIR=/certs + - DOCKER_CERT_PATH=/certs/client - FAKETIME=${PHP_FPM_FAKETIME} depends_on: - workspace @@ -1268,11 +1275,13 @@ services: ### Docker-in-Docker ################################################ docker-in-docker: - image: docker:dind + image: docker:19.03-dind + environment: + DOCKER_TLS_SAN: DNS:docker-in-docker privileged: true volumes: - ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER} - - ${DATA_PATH_HOST}/dind:/var/lib/docker + - docker-in-docker:/certs/client expose: - 2375 networks: