-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathDockerfile
More file actions
25 lines (21 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
25 lines (21 loc) · 793 Bytes
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
FROM alpine:latest
LABEL maintainer="Vasyl Kaigorodov <vkaygorodov@gmail.com>"
LABEL version="latest"
LABEL description="Ultimate Docker container with OpenVPN client and SSH daemon"
RUN apk add --update bash openvpn openssh openssh-keygen bind-tools curl && \
adduser tunnel -D && \
mkdir /vpn_configs && \
mkdir /root/.ssh && \
chmod 0700 /root/.ssh && \
passwd -u tunnel && \
mkdir -p /etc/authorized_keys && \
ssh-keygen -t ed25519 -f /ssh_host_ed25519_key -N "" < /dev/null && \
chmod 400 /ssh_host_ed25519_key && \
rm -rf /var/cache/apk/*
COPY openvpn-ssh.sh /openvpn-ssh.sh
COPY sshd_config /sshd_config
COPY authorized_keys /etc/authorized_keys/tunnel
EXPOSE 22
ENV DVPN_CONFIG "default"
ENV DVPN_DEBUG ""
ENTRYPOINT ["bash", "/openvpn-ssh.sh"]