Skip to content

Commit

Permalink
尝试解决 Docker 证书问题
Browse files Browse the repository at this point in the history
  • Loading branch information
CareyWang committed Mar 3, 2020
1 parent be9bd71 commit 1c61436
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
FROM golang:1.13-alpine AS dependencies
WORKDIR /app
RUN go env -w GO111MODULE="on"

COPY go.sum go.mod ./
RUN go mod tidy

Expand All @@ -11,6 +12,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o bitly main.go

FROM scratch
WORKDIR /app
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=build /app/bitly ./
EXPOSE 8001
ENTRYPOINT ["/app/bitly"]

0 comments on commit 1c61436

Please sign in to comment.