Skip to content

Commit 8e6a2a4

Browse files
authored
Update docker-in-docker (dind) - not working with 18.09+ version
1 parent 4dd4074 commit 8e6a2a4

1 file changed

Lines changed: 14 additions & 5 deletions

File tree

docker-compose.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ volumes:
4949
driver: ${VOLUMES_DRIVER}
5050
graylog:
5151
driver: ${VOLUMES_DRIVER}
52-
dind:
52+
docker-in-docker:
5353
driver: ${VOLUMES_DRIVER}
5454

5555
services:
@@ -154,7 +154,10 @@ services:
154154
tty: true
155155
environment:
156156
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
157-
- DOCKER_HOST=tcp://docker-in-docker:2375
157+
- DOCKER_HOST=tcp://docker-in-docker:2376
158+
- DOCKER_TLS_VERIFY=1
159+
- DOCKER_TLS_CERTDIR=/certs
160+
- DOCKER_CERT_PATH=/certs/client
158161
networks:
159162
- frontend
160163
- backend
@@ -230,13 +233,17 @@ services:
230233
volumes:
231234
- ./php-fpm/php${PHP_VERSION}.ini:/usr/local/etc/php/php.ini
232235
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}${APP_CODE_CONTAINER_FLAG}
236+
- docker-in-docker:/certs/client
233237
expose:
234238
- "9000"
235239
extra_hosts:
236240
- "dockerhost:${DOCKER_HOST_IP}"
237241
environment:
238242
- PHP_IDE_CONFIG=${PHP_IDE_CONFIG}
239-
- DOCKER_HOST=tcp://docker-in-docker:2375
243+
- DOCKER_HOST=tcp://docker-in-docker:2376
244+
- DOCKER_TLS_VERIFY=1
245+
- DOCKER_TLS_CERTDIR=/certs
246+
- DOCKER_CERT_PATH=/certs/client
240247
- FAKETIME=${PHP_FPM_FAKETIME}
241248
depends_on:
242249
- workspace
@@ -1268,11 +1275,13 @@ services:
12681275

12691276
### Docker-in-Docker ################################################
12701277
docker-in-docker:
1271-
image: docker:dind
1278+
image: docker:19.03-dind
1279+
environment:
1280+
DOCKER_TLS_SAN: DNS:docker-in-docker
12721281
privileged: true
12731282
volumes:
12741283
- ${APP_CODE_PATH_HOST}:${APP_CODE_PATH_CONTAINER}
1275-
- ${DATA_PATH_HOST}/dind:/var/lib/docker
1284+
- docker-in-docker:/certs/client
12761285
expose:
12771286
- 2375
12781287
networks:

0 commit comments

Comments
 (0)