wireadmin/Dockerfile

58 lines
1.3 KiB
Docker
Raw Normal View History

2023-09-24 19:18:39 +00:00
FROM node:alpine as base
WORKDIR /app
2023-09-24 19:18:39 +00:00
ENV TZ=UTC
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
2023-09-27 07:01:52 +00:00
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
RUN apk add -U --no-cache \
2023-09-24 19:18:39 +00:00
iproute2 iptables net-tools \
screen vim curl bash \
wireguard-tools \
openssl \
dumb-init \
2023-09-24 19:18:39 +00:00
tor \
redis
2023-09-24 19:18:39 +00:00
FROM node:alpine as builder
WORKDIR /app
COPY /src/package.json /src/package-lock.json ./
2023-09-24 19:18:39 +00:00
RUN npm install
ENV NODE_ENV=production
COPY /src/ .
RUN npm run build
2023-09-24 19:18:39 +00:00
FROM base
WORKDIR /app
2023-09-24 19:18:39 +00:00
ENV NODE_ENV=production
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
COPY /config/torrc /etc/tor/torrc
COPY --from=builder /app/.next ./.next
COPY --from=builder /app/next.config.js ./next.config.js
COPY --from=builder /app/public ./public
COPY /src/package.json /src/package-lock.json ./
RUN npm install --omit dev
2023-09-24 19:18:39 +00:00
EXPOSE 3000/tcp
2023-10-31 15:03:19 +00:00
HEALTHCHECK --interval=60s --timeout=10s --start-period=5s --retries=3 \
CMD curl -f http://127.0.0.1:3000/api/healthcheck || exit 1
2023-09-24 19:18:39 +00:00
COPY docker-entrypoint.sh /usr/bin/entrypoint
2023-09-25 11:56:34 +00:00
RUN chmod +x /usr/bin/entrypoint
2023-09-24 19:18:39 +00:00
ENTRYPOINT ["/usr/bin/entrypoint"]
CMD ["npm", "run", "start"]