forked from arthepsy/pan-globalprotect-okta
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (27 loc) · 1.07 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
FROM python:3.8.3-slim AS builder
WORKDIR /
RUN apt-get update && apt-get install -y --no-install-recommends \
curl automake autoconf libtool make gcc \
libxml2-dev zlib1g-dev libssl-dev pkg-config
RUN curl -L -o /tmp/openconnect.tar.gz https://gitlab.com/openconnect/openconnect/-/archive/v8.10/openconnect-v8.10.tar.gz
RUN tar xvzf /tmp/openconnect.tar.gz
WORKDIR /openconnect-v8.10
RUN ./autogen.sh
RUN ./configure --without-gnutls --disable-nls --with-vpnc-script=/usr/local/sbin/vpnc-script
RUN make check
RUN make
RUN make install
RUN curl -o /usr/local/sbin/vpnc-script https://gitlab.com/openconnect/vpnc-scripts/-/raw/master/vpnc-script
RUN chmod +x /usr/local/sbin/vpnc-script
RUN pip install vpn-slice
FROM python:3.8.3-slim
RUN pip install pyotp requests lxml
RUN set -x \
&& apt-get update \
&& apt-get install -y libxml2 net-tools iproute2 \
&& apt-get clean
COPY --from=builder /usr/local /usr/local
RUN ldconfig
RUN pip install vpn-slice
COPY gp-okta.py /usr/local/bin
CMD ["python", "-u", "/usr/local/bin/gp-okta.py", "/etc/gp-okta.conf"]