fix(chore): code split

This commit is contained in:
Shahrad Elahi
2023-12-19 13:21:23 +03:30
parent 8488858c46
commit 3fdb21d8d7
5 changed files with 74 additions and 55 deletions

View File

@@ -8,9 +8,6 @@ RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY --from=chriswayg/tor-alpine:latest /usr/local/bin/obfs4proxy /usr/local/bin/obfs4proxy
COPY --from=chriswayg/tor-alpine:latest /usr/local/bin/meek-server /usr/local/bin/meek-server
COPY /config/torrc /etc/tor/torrc
COPY /config/obfs4-bridges.conf /etc/torrc.d/obfs4-bridges.conf
# Update and upgrade packages
RUN apk update && apk upgrade \
# Install required packages
@@ -24,6 +21,15 @@ RUN apk update && apk upgrade \
# Clear APK cache
&& rm -rf /var/cache/apk/*
COPY /config/torrc /etc/tor/torrc
COPY /config/obfs4-bridges.conf /etc/torrc.d/obfs4-bridges.conf
COPY /scripts /scripts
RUN chmod -R +x /scripts
COPY /bin /usr/local/bin
RUN chmod -R +x /usr/local/bin
FROM base AS deps
@@ -47,7 +53,7 @@ ENTRYPOINT ["/entrypoint.sh"]
RUN mkdir -p /data && chmod 700 /data
RUN mkdir -p /etc/torrc.d && chmod -R 400 /etc/torrc.d
RUN mkdir -p /var/vlogs && chmod -R 600 /var/vlogs && touch /var/vlogs/web.log
RUN mkdir -p /var/vlogs && chmod -R 600 /var/vlogs && touch /var/vlogs/web
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]