File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11FROM golang:alpine as builder
22
3+ # Install dependencies for copy
34RUN apk add -U --no-cache ca-certificates tzdata
45
6+ # Use an valid GOPATH and copy the files
57WORKDIR /go/src/github.com/cooperspencer/gickup
68COPY . .
79
10+ # Fetching dependencies and build the app
811RUN go get -d -v ./...
912RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
1013
14+ # Use scratch as production environment -> Small builds
1115FROM scratch as production
1216WORKDIR /
17+ # Copy valid SSL certs from the builder for fetching github/gitlab/...
1318COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
14- COPY --from=builder /go/src/github.com/cooperspencer/gickup/app /gickup/app
19+ # Copy zoneinfo for getting the right cron timezone
1520COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
16- CMD ["./gickup/app" ]
21+ # Copy the main executable from the builder
22+ COPY --from=builder /go/src/github.com/cooperspencer/gickup/app /gickup/app
23+
24+ ENTRYPOINT [ "/gickup/app" ]
25+ CMD [ "/gickup/conf.yml" ]
Original file line number Diff line number Diff line change @@ -4,5 +4,5 @@ services:
44 # build: . # If you want to Build the Image locally (You need the complete Repo on your PC)
55 image : buddyspencer/gickup:latest
66 volumes :
7- - ${PWD}/conf.yml:/gickup/conf.yml
8- command : [". /gickup/app", "/gickup/ conf.yml"]
7+ - ${PWD}/conf.yml:/gickup/conf.yml # Change the path of your local config ${PWD} is your current directory (where the docker-compose.yml is located)
8+ command : ["/gickup/conf.yml"] # Changes the path of the internal bound config
You can’t perform that action at this time.
0 commit comments