-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
34 lines (24 loc) · 731 Bytes
/
Dockerfile
File metadata and controls
34 lines (24 loc) · 731 Bytes
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
FROM cgr.dev/chainguard/go:latest-dev AS builder
# Info
LABEL org.opencontainers.image.authors="r@nice.pink"
LABEL org.opencontainers.image.source="https://github.com/nice-pink/"
WORKDIR /app
# get go module ready
COPY go.mod go.sum ./
RUN go mod download
# copy module code
COPY . .
# build all
RUN ./build
# # git
# FROM cgr.dev/chainguard/git:latest-root-dev AS runner
# # add glibc compatibility
# RUN apk add --update gcompat jq
FROM cgr.dev/chainguard/glibc-dynamic:latest AS runner
# Info
LABEL org.opencontainers.image.authors="r@nice.pink"
LABEL org.opencontainers.image.source="https://github.com/nice-pink/"
WORKDIR /app
# copy executable
COPY --from=builder /app/bin/* /app/
# ENTRYPOINT [ "/app/APP_NAME" ]