/
docker-compose.yml
31 lines (28 loc) 路 907 Bytes
/
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
version: '3.2'
volumes:
tmp-data: {}
golint-go: {}
golint-cache: {}
services:
app:
image: golang:1.21-buster # Image page: <https://hub.docker.com/_/golang>
working_dir: /src
environment:
HOME: /tmp
GOPATH: /tmp
volumes:
- /etc/passwd:/etc/passwd:ro
- /etc/group:/etc/group:ro
- .:/src:cached
- tmp-data:/tmp:cached
security_opt: [no-new-privileges:true]
golint:
image: golangci/golangci-lint:v1.57-alpine # Image page: <https://hub.docker.com/r/golangci/golangci-lint>
environment:
GOLANGCI_LINT_CACHE: /tmp/golint # <https://github.com/golangci/golangci-lint/blob/v1.42.0/internal/cache/default.go#L68>
volumes:
- .:/src:ro
- golint-go:/go:rw # go dependencies will be downloaded on each run without this
- golint-cache:/tmp/golint:rw
working_dir: /src
security_opt: [no-new-privileges:true]