-
-
Notifications
You must be signed in to change notification settings - Fork 72
/
Dockerfile
63 lines (49 loc) · 1.45 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
FROM ubuntu:20.04
ENV TZ=Europe/Minsk
ENV DEBIAN_FRONTEND=noninteractive
#COPY ./wg-manager /tmp/build
RUN mkdir -p /tmp/build
WORKDIR /tmp/build
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="[email protected]"
ENV IS_DOCKER True
WORKDIR /app
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
# Install dependencies
#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 \
python3 \
python3-pip \
python3-dev \
python3-gunicorn \
python3-uvicorn \
gunicorn \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install -r requirements.txt
# Install dependencies
#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
# Copy build files from previous step
COPY --from=0 /tmp/build/dist /app/build
ENTRYPOINT python3 startup/start.py