forked from TheSkorm/hassio-openvpn
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathDockerfile
35 lines (26 loc) · 821 Bytes
/
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
ARG BUILD_FROM
FROM $BUILD_FROM
ARG NAME=openvpnclient
# Add env
ENV LANG C.UTF-8
# install openvpn package
RUN apk add --update --no-cache openvpn jq python3 bash python3-dev \
build-base \
linux-headers \
pcre-dev \
py-pip \
curl \
openssl
# setup python within an virtual environment
RUN python3 -m venv /$NAME/venv && \
source /$NAME/venv/bin/activate && \
pip install --upgrade pip --no-cache-dir && \
pip install --upgrade --no-cache-dir setuptools wheel
COPY . /tmp/$NAME
RUN source /$NAME/venv/bin/activate && \
cd /tmp/$NAME && python setup.py bdist_wheel &&\
pip install --no-cache-dir dist/* && cd / && rm -r /tmp/$NAME
WORKDIR /$NAME/venv/
# expose name of working dir to environment
ENV NAME $NAME
ENTRYPOINT /bin/bash /$NAME/venv/bin/run.sh