diff options
| author | jackyzha0 <[email protected]> | 2021-03-01 16:34:08 -0800 |
|---|---|---|
| committer | jackyzha0 <[email protected]> | 2021-03-01 16:34:08 -0800 |
| commit | 5ee0a85c0196000e8e0532fcff11003d5896ef2d (patch) | |
| tree | 13fd1f2cc19e1c26db71407040e6f956bfcc46aa | |
| parent | fix(deps): re-add go.sum (diff) | |
| download | ctrl-v-5ee0a85c0196000e8e0532fcff11003d5896ef2d.tar.xz ctrl-v-5ee0a85c0196000e8e0532fcff11003d5896ef2d.zip | |
patch(ci): add ci specific dockerfile that excludes .env
| -rw-r--r-- | backend/Dockerfile-ci | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/backend/Dockerfile-ci b/backend/Dockerfile-ci new file mode 100644 index 0000000..45b03c8 --- /dev/null +++ b/backend/Dockerfile-ci @@ -0,0 +1,11 @@ +FROM golang:alpine AS builder +ENV GO111MODULE=on +COPY . /app/src +WORKDIR /app/src +RUN apk add git ca-certificates +RUN CGO_ENABLED=0 GOOS=linux go build -o /go/bin/app + +FROM scratch +COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ +COPY --from=builder /go/bin/app ./ +ENTRYPOINT ["./app"]
\ No newline at end of file |