forked from cmulk/wireguard-docker
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Dockerfile
28 lines (21 loc) · 801 Bytes
/
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
FROM debian:buster
# Add debian backports repo for wireguard packages
RUN echo "deb http://deb.debian.org/debian/ buster-backports main" > /etc/apt/sources.list.d/buster-backports.list
# Install wireguard packges
RUN apt-get update && \
apt-get install -y --no-install-recommends wireguard-tools iptables nano net-tools procps openresolv docker.io jq dnsmasq curl dnsutils && \
apt-get clean
# Add main work dir to PATH
WORKDIR /scripts
ENV PATH="/scripts:${PATH}"
# Use iptables masquerade NAT rule
ENV IPTABLES_MASQ=1
# Copy scripts to containers
COPY install-module /scripts
COPY run /scripts
COPY genkeys /scripts
RUN chmod 755 /scripts/*
# Wirguard interface configs go in /etc/wireguard
VOLUME /etc/wireguard
# Normal behavior is just to run wireguard with existing configs
CMD ["run"]