-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
40 lines (40 loc) · 1.35 KB
/
docker-compose.yaml
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
services:
golang-devtools:
build:
context: docker-compose
target: golang-devtools
dockerfile: Dockerfile
privileged: true
security_opt:
- seccomp:unconfined
- apparmor:unconfined
volumes:
- .:/srv/workspace:z
- ${DOCKER_CONFIG:-~/.docker}:/root/.docker
- ${GIT_CONFIG:-~/.gitconfig}:${GIT_CONFIG_GUEST:-/root/.gitconfig}
- ${SSH_CONFIG:-~/.ssh}:/root/.ssh
- ${XDG_CACHE_HOME:-xdg-cache-home}:/root/.cache
# ${x:-y} explained here https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-Expansion.html#:~:text=3.5.3%20Shell%20Parameter%20Expansion
environment:
GOMODCACHE: /root/.cache/go-mod
techdocs:
build:
context: docker-compose
dockerfile: Dockerfile
target: techdocs
working_dir: /srv/workspace
environment:
GOOGLE_APPLICATION_CREDENTIALS: ${GOOGLE_APPLICATION_CREDENTIALS:-}
GCLOUD_PROJECT: ${GCLOUD_PROJECT:-}
volumes:
- .:/srv/workspace:z
- ${XDG_CACHE_HOME:-xdg-cache-home}:/root/.cache
- $HOME/.config/gcloud:/root/.config/gcloud
- ${GOOGLE_APPLICATION_CREDENTIALS:-nothing}:${GOOGLE_APPLICATION_CREDENTIALS:-/tmp/empty-GOOGLE_APPLICATION_CREDENTIALS}
ports:
- "127.0.0.1:3000:3000/tcp"
- "127.0.0.1:8000:8000/tcp"
command: serve
volumes:
xdg-cache-home: { }
nothing: { }