mirror of
https://github.com/wireadmin/wireadmin
synced 2025-01-23 04:17:00 +00:00
53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
FROM node:alpine as base
|
|
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
|
|
WORKDIR /app
|
|
|
|
ENV TZ=UTC
|
|
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
|
|
|
|
# Update and upgrade packages
|
|
RUN apk update && apk upgrade \
|
|
# Install required packages
|
|
&& apk add -U --no-cache \
|
|
iproute2 iptables net-tools \
|
|
screen vim curl bash \
|
|
wireguard-tools \
|
|
openssl \
|
|
tor \
|
|
redis \
|
|
# 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 /app/bin
|
|
RUN chmod -R +x /app/bin
|
|
ENV PATH="$PATH:/app/bin"
|
|
|
|
|
|
FROM base AS runner
|
|
|
|
ENV PNPM_HOME="/pnpm"
|
|
ENV PATH="$PNPM_HOME:$PATH"
|
|
RUN corepack enable
|
|
|
|
COPY docker-entrypoint.sh /entrypoint.sh
|
|
RUN chmod +x /entrypoint.sh
|
|
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
|
|
|
|
VOLUME ["/etc/torrc.d", "/data", "/var/vlogs"]
|
|
|
|
# run the appc
|
|
EXPOSE 5173/tcp
|
|
CMD [ "npm", "run", "dev", "--", "--host" ] |