You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

64 lines
1.5 KiB

4 years ago
FROM ubuntu:20.04
ENV TZ=Europe/Minsk
ENV DEBIAN_FRONTEND=noninteractive
5 years ago
#COPY ./wg-manager /tmp/build
RUN mkdir -p /tmp/build
5 years ago
WORKDIR /tmp/build
4 years ago
RUN apt-get update && apt-get install -y \
nodejs \
npm \
&& rm -rf /var/lib/apt/lists/*
RUN npm cache clean --force
RUN npm install
RUN npm install @angular/cli
RUN node_modules/@angular/cli/bin/ng build --configuration="production"
RUN rm -rf node_modules
RUN apt-get purge nodejs npm -y
FROM ubuntu:20.04
LABEL maintainer="per@sysx.no"
ENV IS_DOCKER True
WORKDIR /app
4 years ago
ENV LIBRARY_PATH=/lib:/usr/lib
ENV TZ=Europe/Oslo
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
COPY wg-manager-backend /app
4 years ago
# Install dependencies
4 years ago
#RUN apk add --no-cache --update wireguard-tools py3-gunicorn python3 py3-pip ip6tables
RUN apt-get update && apt-get install -y \
wireguard-tools \
iptables \
iproute2 \
4 years ago
python3 \
python3-pip \
python3-dev \
python3-gunicorn \
python3-uvicorn \
gunicorn \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install -r requirements.txt
5 years ago
# Install dependencies
4 years ago
#RUN apk add --no-cache build-base python3-dev libffi-dev jpeg-dev zlib-dev && \
#pip3 install uvicorn && \
#pip3 install -r requirements.txt && \
#apk del build-base python3-dev libffi-dev jpeg-dev zlib-dev
# Copy startup scripts
COPY docker/ ./startup
RUN chmod 700 ./startup/start.py
5 years ago
# Copy build files from previous step
5 years ago
COPY --from=0 /tmp/build/dist /app/build
ENTRYPOINT python3 startup/start.py