wireguard-dashboard/Dockerfile
coward 9133fb2f5b
Some checks reported errors
continuous-integration/drone/tag Build was killed
🎨
2024-05-09 08:44:47 +08:00

26 lines
388 B
Docker

FROM golang:alpine as build
RUN apk add upx
WORKDIR /build
COPY . .
# sqlite必须
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
RUN go mod download && go build -o app && up -9 app
RUN ls -lh && chmod +x ./app
FROM alpine
WORKDIR /app
RUN mkdir -p db
COPY --from=build /build/app /app
COPY --from=build /build/template/* /app/template/
RUN ls -al
ENTRYPOINT ["./app"]