This commit is contained in:
parent
961cf4ca5b
commit
e693f720cc
11
Dockerfile
11
Dockerfile
@ -22,19 +22,24 @@ COPY --from=build-stage /front/web/ /build/web
|
|||||||
ENV GO111MODULE=on
|
ENV GO111MODULE=on
|
||||||
ENV GOPROXY=https://goproxy.cn,direct
|
ENV GOPROXY=https://goproxy.cn,direct
|
||||||
|
|
||||||
RUN go build -ldflags="-s -w" -o app && upx -9 app
|
RUN go build -ldflags="-s -w" -o wgui && upx -9 wgui
|
||||||
|
|
||||||
RUN ls -lh && chmod +x ./app
|
RUN ls -lh && chmod +x ./wgui
|
||||||
|
|
||||||
FROM alpine
|
FROM alpine
|
||||||
|
|
||||||
|
RUN addgroup -S wgui && \
|
||||||
|
adduser -S -D -G wgui wgui
|
||||||
|
|
||||||
ENV GIN_MODE=release
|
ENV GIN_MODE=release
|
||||||
RUN apk --no-cache add ca-certificates wireguard-tools jq iptables
|
RUN apk --no-cache add ca-certificates wireguard-tools jq iptables
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
RUN mkdir -p db
|
RUN mkdir -p db
|
||||||
|
|
||||||
COPY --from=build /build/app /app
|
COPY --from=build --chown=wgui:wgui /build/wgui /app
|
||||||
COPY --from=build /build/template/* /app/template/
|
COPY --from=build /build/template/* /app/template/
|
||||||
|
|
||||||
|
RUN chmod +x wgui
|
||||||
|
|
||||||
ENTRYPOINT ["./app"]
|
ENTRYPOINT ["./app"]
|
Loading…
Reference in New Issue
Block a user