Created
October 13, 2022 06:31
-
-
Save 1k-off/b081a51d61b9df4fcca552370b32a4c0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM golang:1-alpine as build | |
WORKDIR /src | |
RUN apk update && apk add --no-cache ca-certificates git | |
COPY go.mod go.sum ./ | |
RUN go mod download | |
COPY . . | |
WORKDIR /src/cmd/ccc | |
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/ccc | |
WORKDIR /src/cmd/ccc-cli | |
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/ccc-cli | |
FROM scratch | |
LABEL maintainer="Bogdan Kosarevskyi <bogdan.kosarevskyi@gmail.com>" | |
WORKDIR /app | |
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ | |
COPY --from=build /app /app | |
EXPOSE 8080 | |
CMD ["/app/ccc"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment