Merge pull request #18 from halverneus/bugfix/move_exposed_container

Bugfix/move exposed container
This commit is contained in:
Jeromy Streets 2019-01-04 09:16:46 -08:00 committed by GitHub
commit 50d8d71b08
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 4 deletions

View File

@ -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 []

View File

@ -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}