mirror of
https://github.com/tobychui/zoraxy.git
synced 2025-06-03 06:07:20 +02:00
Merge pull request #239 from tobychui/main
Merge change in main branch before v3.0.8 release
This commit is contained in:
commit
6bfeb8cf3d
@ -1,6 +1,4 @@
|
||||
FROM docker.io/golang:alpine
|
||||
|
||||
RUN apk add --no-cache bash netcat-openbsd sudo
|
||||
FROM docker.io/golang:alpine AS build
|
||||
|
||||
RUN mkdir -p /opt/zoraxy/source/ &&\
|
||||
mkdir -p /opt/zoraxy/config/ &&\
|
||||
@ -8,8 +6,6 @@ RUN mkdir -p /opt/zoraxy/source/ &&\
|
||||
|
||||
RUN chmod -R 770 /opt/zoraxy/
|
||||
|
||||
VOLUME [ "/opt/zoraxy/config/" ]
|
||||
|
||||
# If you build it yourself, you will need to add the src directory into the docker directory.
|
||||
COPY ./src/ /opt/zoraxy/source/
|
||||
|
||||
@ -22,6 +18,15 @@ RUN go mod tidy &&\
|
||||
RUN chmod 755 /usr/local/bin/zoraxy &&\
|
||||
chmod +x /usr/local/bin/zoraxy
|
||||
|
||||
FROM docker.io/alpine:3.20
|
||||
|
||||
RUN apk add --no-cache bash netcat-openbsd sudo
|
||||
|
||||
COPY --from=build /usr/local/bin/zoraxy /usr/local/bin/zoraxy
|
||||
COPY --from=build /opt/zoraxy/config/ /opt/zoraxy/config
|
||||
|
||||
VOLUME [ "/opt/zoraxy/config/" ]
|
||||
|
||||
WORKDIR /opt/zoraxy/config/
|
||||
|
||||
ENV AUTORENEW="86400"
|
||||
@ -41,4 +46,3 @@ ENV ZTPORT="9993"
|
||||
ENTRYPOINT "zoraxy" "-docker=true" "-autorenew=${AUTORENEW}" "-fastgeoip=${FASTGEOIP}" "-log=${LOG}" "-mdns=${MDNS}" "-mdnsname=${MDNSNAME}" "-noauth=${NOAUTH}" "-port=:${PORT}" "-sshlb=${SSHLB}" "-version=${VERSION}" "-webfm=${WEBFM}" "-webroot=${WEBROOT}" "-ztauth=${ZTAUTH}" "-ztport=${ZTPORT}"
|
||||
|
||||
HEALTHCHECK --interval=15s --timeout=5s --start-period=10s --retries=3 CMD nc -vz 127.0.0.1 $PORT || exit 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user