Skip to content

Commit

Permalink
publish from scratch
Browse files Browse the repository at this point in the history
  • Loading branch information
jpillora committed Jan 27, 2023
1 parent cf3f3b5 commit 167d12e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# build stage
FROM golang:alpine AS build-env
FROM golang:alpine AS build
RUN apk update && apk add git
ADD . /src
WORKDIR /src
Expand All @@ -8,9 +8,9 @@ RUN go build \
-ldflags "-X main.version=$(git describe --abbrev=0 --tags)" \
-o /tmp/bin
# run stage
FROM alpine
FROM scratch
LABEL maintainer="dev@jpillora.com"
RUN apk update && apk add --no-cache ca-certificates
COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
WORKDIR /app
COPY --from=build-env /tmp/bin /app/bin
COPY --from=build /tmp/bin /app/bin
ENTRYPOINT ["/app/bin"]

0 comments on commit 167d12e

Please sign in to comment.