wireguard-dashboard/Dockerfile

26 lines
392 B
Docker
Raw Normal View History

2024-05-08 14:21:49 +08:00
FROM golang:alpine as build
2024-05-08 14:33:40 +08:00
RUN apk add upx
2024-05-08 14:21:49 +08:00
WORKDIR /build
COPY . .
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn,direct
2024-05-08 14:33:40 +08:00
RUN go mod download && go build -o app && upx -9 app
2024-05-08 14:21:49 +08:00
RUN ls -lh && chmod +x ./app
FROM alpine
2024-05-08 14:59:40 +08:00
WORKDIR /app
WORKDIR db
2024-05-08 14:21:49 +08:00
2024-05-08 14:59:40 +08:00
COPY --from=build /build/app /app
COPY --from=build /build/template/* /app/template/
2024-05-08 14:21:49 +08:00
2024-05-08 14:59:40 +08:00
RUN ls -al /app/ | grep 'app'
ENTRYPOINT ["/app/app"]