-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
42 lines (30 loc) · 1.14 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
37
38
39
40
41
42
FROM --platform=linux/amd64 ubuntu:20.04
LABEL maintainer="Grega Vrbančič <[email protected]>"
ENV DEBIAN_FRONTEND noninteractive
ENV NETEXTENDER_URL "https://software.sonicwall.com/NetExtender/NetExtender.Linux-10.2.845.x86_64.tgz"
ARG UID="1100"
ENV UID ${UID}
ARG USERNAME="netextender"
ENV USERNAME ${USERNAME}
USER root
WORKDIR /tmp
RUN apt-get update && \
apt-get -y --no-install-recommends install ca-certificates file curl sudo ppp ipppd iptables iproute2 net-tools kmod iputils-ping telnet && \
curl ${NETEXTENDER_URL} | tar xz && \
cd netExtenderClient && \
sed -i -e "s@read -p ' Set pppd to run as root.*@REPLY='Y'@g" install && \
chmod +x ./install && \
./install > /dev/null && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Fake ppp
RUN echo pppoe > /etc/modules
RUN mknod /dev/ppp c 108 0
RUN useradd -u ${UID} -m -U ${USERNAME} && \
echo "${USERNAME} ALL=(ALL) NOPASSWD: /sbin/iptables, /bin/mknod" >> /etc/sudoers
COPY scripts/entrypoint.sh /
RUN chown ${USERNAME}:${USERNAME} /entrypoint.sh && \
chmod +x /entrypoint.sh
USER ${USERNAME}
ENTRYPOINT "/entrypoint.sh"