This is the WireGuard base image from Pro Custodibus. It contains just the core WireGuard wg and wg-quick programs, plus a few core network utilities like iptables and iproute2. It requires the container's host either to be running the Linux kernel version 5.6 or newer, or to itself have the WireGuard kernel module installed.
This image is based on the minimal Alpine Linux image. It's generated with the docker/wireguard.dockerfile from our agent source repository. We update the latest version of this image weekly to pick up the latest security fixes to the embedded software.
Create a wg-quick conf file somewhere on the container host like /srv/containers/wireguard/conf/wg0.conf:
# /srv/containers/wireguard/conf/wg0.conf
[Interface]
PrivateKey = AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEE=
Address = 10.0.0.1/32
ListenPort = 51820
[Peer]
PublicKey = fE/wdxzl0klVp/IR8UcaoGUMjqaWi3jAd7KzHKFS6Ds=
Endpoint = 203.0.113.2:51820
AllowedIPs = 10.0.0.2/32
Then run a container for this WireGuard interface with the following docker run command:
sudo docker run \
--cap-add NET_ADMIN \
--publish 51820:51820/udp \
--name wireguard \
--rm \
--volume /srv/containers/wireguard/conf:/etc/wireguard \
procustodibus/wireguard
Or alternatively, create the following docker-compose.yml file in the directory above the wq-quick conf file:
# /srv/containers/wireguard/docker-compose.yml
version: '3'
services:
wireguard:
image: procustodibus/wireguard
cap_add:
- NET_ADMIN
ports:
- 51820:51820/udp
volumes:
- ./conf:/etc/wireguard
And start up the container by running sudo docker-compose up from the same directory as the docker-compose.yml file.
latest: Latest build.v1: WireGuard major version.v1.0: WireGuard minor version.v1.0.20210424: WireGuard patch version.v1.0.20210424-i211109: Weekly build.linux/amd64linux/arm64linux/arm/v7linux/arm/v6Content type
Image
Digest
sha256:ff5e50f02…
Size
7 MB
Last updated
3 days ago
docker pull procustodibus/wireguard