wireadmin/Dockerfile-Dev

48 lines
1.4 KiB
Plaintext
Raw Normal View History

2023-11-02 11:04:25 +00:00
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
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
2023-11-02 13:02:33 +00:00
# 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 \
2023-11-02 13:02:33 +00:00
iproute2 iptables net-tools \
screen vim curl bash \
wireguard-tools \
openssl \
dumb-init \
tor \
redis
# Clear cache
RUN rm -rf /var/cache/apk/*
2023-09-24 19:18:39 +00:00
2023-11-02 11:04:25 +00:00
FROM base AS deps
2023-09-24 19:18:39 +00:00
2023-11-02 11:04:25 +00:00
RUN mkdir -p /temp/dev
2023-11-02 13:02:33 +00:00
COPY web/package.json web/bun.lockb web/node_modules* /temp/dev/
2023-11-02 11:04:25 +00:00
RUN cd /temp/dev && bun install --frozen-lockfile
2023-09-24 19:18:39 +00:00
2023-11-02 11:04:25 +00:00
2023-11-02 13:02:33 +00:00
FROM base AS runner
2023-11-02 11:04:25 +00:00
COPY --from=deps /temp/dev/node_modules node_modules
COPY web .
2023-11-02 13:02:33 +00:00
# run the appc
EXPOSE 5173/tcp
CMD [ "bun", "dev", "--host" ]