Skip to content

Commit 85ebb1b

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents df6767f + af10e46 commit 85ebb1b

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

Dockerfile

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,25 @@
11
FROM golang:alpine as builder
22

3+
# Install dependencies for copy
34
RUN apk add -U --no-cache ca-certificates tzdata
45

6+
# Use an valid GOPATH and copy the files
57
WORKDIR /go/src/github.com/cooperspencer/gickup
68
COPY . .
79

10+
# Fetching dependencies and build the app
811
RUN go get -d -v ./...
912
RUN CGO_ENABLED=0 go build -a -installsuffix cgo -o app .
1013

14+
# Use scratch as production environment -> Small builds
1115
FROM scratch as production
1216
WORKDIR /
17+
# Copy valid SSL certs from the builder for fetching github/gitlab/...
1318
COPY --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
1520
COPY --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" ]

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)