openconnect-proxy/build/Dockerfile

41 lines
1.8 KiB
Docker
Raw Normal View History

FROM alpine:edge
2018-11-29 12:07:38 +00:00
MAINTAINER Wolfgang Klinger <wolfgang@wazum.com>
RUN apk add --no-cache libcrypto1.1 libssl1.1 libstdc++ --repository http://dl-cdn.alpinelinux.org/alpine/edge/main
RUN apk add --no-cache oath-toolkit-libpskc --repository http://dl-cdn.alpinelinux.org/alpine/edge/community
RUN apk add --no-cache nettle --repository http://dl-cdn.alpinelinux.org/alpine/edge/main
2019-10-15 06:11:23 +00:00
# openconnect is not yet available on main
RUN apk add --no-cache openconnect tinyproxy --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing
2018-11-29 12:07:38 +00:00
2019-10-15 06:11:23 +00:00
RUN apk add --no-cache ca-certificates wget \
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub \
&& wget https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.30-r0/glibc-2.30-r0.apk \
&& apk add --no-cache --virtual .build-deps glibc-2.30-r0.apk gcc make musl-dev \
&& cd /tmp \
&& wget https://github.com/rofl0r/microsocks/archive/v1.0.1.tar.gz \
&& tar -xzvf v1.0.1.tar.gz \
&& cd microsocks-1.0.1 \
&& make \
&& make install \
2019-10-19 11:04:46 +00:00
# add vpn-slice with dependencies (dig) https://github.com/dlenski/vpn-slice
&& apk add --no-cache python3 bind-tools && pip3 install --upgrade pip \
&& pip3 install https://github.com/dlenski/vpn-slice/archive/master.zip \
# always add the docker DNS server
&& grep -qxF 'nameserver 127.0.0.11' /etc/resolv.conf || echo 'nameserver 127.0.0.11' >> /etc/resolv.conf \
2019-10-15 06:11:23 +00:00
&& apk del .build-deps wget
2018-11-29 12:07:38 +00:00
# Use an up-to-date version of vpnc-script
# https://www.infradead.org/openconnect/vpnc-script.html
2018-11-29 12:07:38 +00:00
COPY vpnc-script /etc/vpnc/vpnc-script
RUN chmod 755 /etc/vpnc/vpnc-script
COPY tinyproxy.conf /etc/tinyproxy.conf
2018-11-29 12:07:38 +00:00
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
2019-10-16 06:16:25 +00:00
EXPOSE 8888
EXPOSE 8889
2019-10-15 06:11:23 +00:00
2018-11-29 12:07:38 +00:00
ENTRYPOINT ["/entrypoint.sh"]