Spaces:
Build error
Build error
# read the doc: https://huggingface.co/docs/hub/spaces-sdks-docker | |
# you will also find guides on how best to write your Dockerfile | |
FROM ubuntu:22.04 | |
RUN apt-get update | |
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
sudo \ | |
build-essential \ | |
gettext \ | |
autoconf \ | |
automake \ | |
libproxy-dev \ | |
libxml2-dev \ | |
libtool \ | |
vpnc-scripts \ | |
pkg-config \ | |
libgnutls28-dev \ | |
git \ | |
expect | |
RUN apt-get update \ | |
&& apt-get install -y python3-pip python3-dev \ | |
&& cd /usr/local/bin \ | |
&& ln -s -f /usr/bin/python3 python \ | |
&& pip3 --no-cache-dir install --upgrade pip \ | |
&& rm -rf /var/lib/apt/lists/* | |
RUN git clone https://github.com/openconnect/openconnect.git | |
WORKDIR /openconnect | |
RUN ./autogen.sh | |
RUN ./configure | |
RUN make | |
COPY requirements.txt /openconnect/requirements.txt | |
RUN python -m pip install -r /openconnect/requirements.txt | |
USER root | |
RUN mkdir -p /var/run/vpnc | |
RUN chmod -R 777 /var/run/vpnc | |
RUN cat /dev/net/tun | |
RUN mkdir -p /dev/net | |
RUN mknod /dev/net/tun c 10 200 | |
RUN chmod 600 /dev/net/tun | |
COPY aberconnect.sh /openconnect | |
RUN chmod +x aberconnect.sh | |
ENTRYPOINT ["./aberconnect.sh"] | |