Private
Public Access
0
0

reorder to try to use go modules

This commit is contained in:
teizz
2021-09-30 12:26:15 +02:00
parent cd0673777f
commit 979ef108f4
9 changed files with 86 additions and 33 deletions

15
docker/Dockerfile Normal file
View File

@@ -0,0 +1,15 @@
FROM golang:alpine AS builder
RUN apk --no-cache --no-progress add make upx
WORKDIR /go/src/lolcathost/pathway/
COPY src/*.go VERSION ./
RUN echo Building && \
env CGO_ENABLED=0 GO111MODULE=off go build -trimpath -ldflags="all=-s -w -buildid= -X main.version=$(cat VERSION) -X main.buildtime=$(date +%FT%T%z)" && \
echo Compressing && \
upx pathway > /dev/null
FROM scratch
COPY --from=builder /go/src/lolcathost/pathway/pathway /pathway
EXPOSE 8080
CMD ["/pathway"]