-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
70 lines (63 loc) · 1.88 KB
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
version: "3.9"
x-aliases:
- &DEFAULT_ARGS
DOCKER_VERSION: ${DOCKER_VERSION:-25.0.3}
DOCKER_BUILDX_VERSION: ${DOCKER_BUILDX_VERSION:-0.12.1}
DOCKER_AWS_ECR_CREDENTIAL_HELPER_VERSION: ${DOCKER_AWS_ECR_CREDENTIAL_HELPER_VERSION:-0.7.1}
DOCKER_PASS_CREDENTIAL_HELPER_VERSION: ${DOCKER_PASS_CREDENTIAL_HELPER_VERSION:-0.8.1}
volumes:
dind-ca: {}
dind-server: {}
dind-client: {}
networks:
dind: {}
services:
local:
image: ${REGISTRY:-docker.io}/${NAMESPACE:-symfonywithswoole}/${PROJECT_NAME:-docker-client}-local:${IMAGE_TAG:-local}
build:
context: .
target: "${TARGET:-client}"
args:
<<: *DEFAULT_ARGS
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./examples:/workspace:ro
dind:
image: docker.io/docker:${DOCKER_VERSION:-25.0.3}-dind
restart: always
privileged: true
environment:
# same as docker-compose service
DOCKER_TLS_SAN: DNS:dind
DOCKER_TLS_CERTDIR: /certs
volumes:
- dind-ca:/certs/ca:rw
- dind-server:/certs/server:rw
- dind-client:/certs/client:rw
networks:
- dind
remote:
image: ${REGISTRY:-docker.io}/${NAMESPACE:-symfonywithswoole}/${PROJECT_NAME:-docker-client}-remote:${IMAGE_TAG:-local}
depends_on:
- dind
build:
context: .
target: "${TARGET:-client}"
args:
<<: *DEFAULT_ARGS
environment:
DOCKER_HOST: tcp://dind:2376
DOCKER_TLS_CERTDIR: /certs
DOCKER_CERT_PATH: /certs/client
DOCKER_TLS_VERIFY: 1
DOCKER_BUILDX_CONTEXT_CREATE: 1
DOCKER_BUILDX_BUILDER_CREATE: 1
volumes:
- dind-client:/certs/client:ro
- ./examples:/workspace:ro
networks:
- dind
example-nginx:
image: ${REGISTRY:-docker.io}/${NAMESPACE:-symfonywithswoole}/${PROJECT_NAME:-docker-client}-example-nginx:${IMAGE_TAG:-local}
build:
context: examples/nginx