wireadmin/Dockerfile-Dev
2023-11-03 18:29:09 +03:30

48 lines
1.4 KiB
Plaintext

FROM oven/bun:alpine as base
LABEL Maintainer="Shahrad Elahi <https://github.com/shahradelahi>"
WORKDIR /usr/src/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
# Set the mirror list
RUN echo "https://uk.alpinelinux.org/alpine/latest-stable/main" > /etc/apk/repositories && \
echo "https://mirror.bardia.tech/alpine/latest-stable/main" >> /etc/apk/repositories && \
echo "https://uk.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories &&\
echo "https://mirror.bardia.tech/alpine/latest-stable/community" >> /etc/apk/repositories
# Update and upgrade packages
RUN apk update && apk upgrade
# Install required packages
RUN apk add -U --no-cache \
iproute2 iptables net-tools \
screen vim curl bash \
wireguard-tools \
openssl \
dumb-init \
tor \
redis
# Clear cache
RUN rm -rf /var/cache/apk/*
FROM base AS deps
RUN mkdir -p /temp/dev
COPY web/package.json web/bun.lockb web/node_modules* /temp/dev/
RUN cd /temp/dev && bun install --frozen-lockfile
FROM base AS runner
COPY --from=deps /temp/dev/node_modules node_modules
COPY web .
# run the appc
EXPOSE 5173/tcp
CMD [ "bun", "dev", "--host" ]