certidude/Dockerfile

33 lines
930 B
Docker
Raw Normal View History

ARG base_image=ubuntu:20.04
FROM $base_image as build
ENV PYTHONUNBUFFERED=1
ENV LC_ALL C.UTF-8
ENV DEBIAN_FRONTEND noninteractive
# Make apt faster
2021-05-01 11:31:55 +00:00
RUN echo force-unsafe-io > /etc/dpkg/dpkg.cfg.d/docker-apt-speedup \
&& echo "Dpkg::Use-Pty=0;" > /etc/apt/apt.conf.d/99quieter
2021-05-01 11:31:55 +00:00
RUN apt-get update -qq \
&& apt-get install -y -qq \
python3-pip \
2021-04-14 11:26:50 +00:00
openvpn \
2021-05-03 08:14:13 +00:00
strongswan \
libcharon-extra-plugins
2021-04-22 10:57:51 +00:00
# Dump on console what modules StrongSwan attempts to load
2021-05-01 11:31:55 +00:00
RUN echo '#!/bin/bash' > /usr/sbin/modprobe \
&& echo 'echo Attempting to load modules: $@' >> /usr/sbin/modprobe \
&& chmod +x /usr/sbin/modprobe
2021-04-22 10:57:51 +00:00
2021-04-14 11:26:50 +00:00
COPY entrypoint-openvpn.sh /entrypoint-openvpn.sh
COPY entrypoint-strongswan.sh /entrypoint-strongswan.sh
COPY pinecrypt/client/. /src/pinecrypt/client
COPY setup.py /src/
COPY README.md /src/
COPY misc/ /src/misc/
WORKDIR /src
2021-05-01 11:31:55 +00:00
RUN pip3 install . \
&& echo "#!/bin/sh" > /usr/bin/chcon \
&& chmod +x /usr/bin/chcon