diff --git a/Dockerfile b/Dockerfile index d87027c..e20d684 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,19 +22,24 @@ COPY --from=build-stage /front/web/ /build/web ENV GO111MODULE=on 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 +RUN addgroup -S wgui && \ + adduser -S -D -G wgui wgui + ENV GIN_MODE=release RUN apk --no-cache add ca-certificates wireguard-tools jq iptables WORKDIR /app 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/ +RUN chmod +x wgui + ENTRYPOINT ["./app"] \ No newline at end of file