Merge pull request #18 from halverneus/bugfix/move_exposed_container

Bugfix/move exposed container
pull/19/head v1.5.2
Jeromy Streets 5 years ago committed by GitHub
commit 50d8d71b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      Dockerfile
  2. 3
      Dockerfile.all

@ -1,7 +1,9 @@
################################################################################
## GO BUILDER
################################################################################
FROM golang:1.11.3 as builder
EXPOSE 8080
ENV VERSION 1.5.1
ENV VERSION 1.5.2
ENV BUILD_DIR /build
RUN mkdir -p ${BUILD_DIR}
@ -14,7 +16,12 @@ COPY . .
RUN go test -cover ./...
RUN CGO_ENABLED=0 go build -a -tags netgo -installsuffix netgo -ldflags "-X github.com/halverneus/static-file-server/cli/version.version=${VERSION}" -o /serve /build/bin/serve
################################################################################
## DEPLOYMENT CONTAINER
################################################################################
FROM scratch
EXPOSE 8080
COPY --from=builder /serve /
ENTRYPOINT ["/serve"]
CMD []

@ -1,7 +1,6 @@
FROM golang:1.11.3 as builder
EXPOSE 8080
ENV VERSION 1.5.1
ENV VERSION 1.5.2
ENV BUILD_DIR /build
RUN mkdir -p ${BUILD_DIR}

Loading…
Cancel
Save