include an example cmd
This commit is contained in:
16
cmd/Dockerfile
Normal file
16
cmd/Dockerfile
Normal file
@@ -0,0 +1,16 @@
|
||||
FROM golang:alpine AS builder
|
||||
RUN apk --no-cache --no-progress add upx
|
||||
WORKDIR /go/build
|
||||
|
||||
COPY . .
|
||||
RUN echo Building && \
|
||||
go get -u && \
|
||||
env CGO_ENABLED=0 go build -trimpath -ldflags="all=-s -w -buildid= -X main.version=v$(cat VERSION) -X main.buildtime=$(date +%FT%T%z)" -o pathway && \
|
||||
echo Compressing && \
|
||||
upx pathway > /dev/null
|
||||
|
||||
FROM scratch
|
||||
COPY --from=builder /go/build/pathway /pathway
|
||||
|
||||
EXPOSE 8080
|
||||
CMD ["/pathway"]
|
||||
Reference in New Issue
Block a user