-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathDockerfile.Pack
40 lines (26 loc) · 1020 Bytes
/
Dockerfile.Pack
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
FROM ubuntu:24.04
RUN apt update && apt install -y --no-install-recommends \
ocserv gnutls-bin build-essential gettext-base iptables \
cron openssl sudo python3 python3-dev python3-pip python3-venv && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1 \
PIP_DISABLE_PIP_VERSION_CHECK=1
# ARG HOST
# ARG DEBUG
# ARG CORS_ALLOWED
RUN mkdir -p /app /opt/venv /app/db
WORKDIR /app
COPY back-end/requirements.txt .
RUN python3 -m venv /opt/venv && \
/opt/venv/bin/pip install --upgrade pip setuptools && \
/opt/venv/bin/pip install -r requirements.txt
ENV PATH="/opt/venv/bin:$PATH"
COPY back-end/ /app
COPY configs/services_pack.sh /services.sh
COPY configs/entrypoint_ocserv.sh /entrypoint.sh
RUN chmod +x /services.sh /entrypoint.sh && echo net.ipv4.ip_forward=1 | tee -a /etc/sysctl.conf && sysctl -p
EXPOSE 443/tcp 443/udp
VOLUME ["/etc/ocserv", "/app/db"]
ENTRYPOINT ["/entrypoint.sh"]
CMD ["/services.sh"]