Files
linuxkit/test/cases/040_packages/023_wireguard/test.yml
Justin Cormack 26e8a72674 Merge pull request #3305 from rn/kern-up
Add support for 5.0.x kernels and update to 4.20.15/4.19.28
2019-03-18 12:07:15 +00:00

94 lines
2.6 KiB
YAML

kernel:
image: linuxkit/kernel:4.19.28
cmdline: "console=ttyS0 console=ttyAMA0"
init:
- linuxkit/init:629fdad56e62ae72bf8becf0c8a668241480d3ff
- linuxkit/runc:606971451ea29b4238029804ca638f9f85caf5af
- linuxkit/containerd:39ac21278cfcc10dbcc32ad7f5abbe820852c5bd
- linuxkit/ca-certificates:906c46a26fd2df271bf64c0259bf2267f7593213
onboot:
- name: dhcpcd
image: linuxkit/dhcpcd:85738d3d2f152a7879e17a61444f7714b858c2ee
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
- name: wg0
image: linuxkit/ip:4787413a729748bcf7560c73e0b46d38b8a8df2b
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["/usr/bin/lk-wg-config", "configure", "/etc/wireguard/wg0.conf"]
runtime:
interfaces:
- name: wg0
add: wireguard
createInRoot: true
bindNS:
net: /run/netns/wg0
- name: wg1
image: linuxkit/ip:4787413a729748bcf7560c73e0b46d38b8a8df2b
net: new
binds:
- /etc/wireguard:/etc/wireguard
command: ["/usr/bin/lk-wg-config", "configure", "/etc/wireguard/wg1.conf"]
runtime:
interfaces:
- name: wg1
add: wireguard
createInRoot: true
bindNS:
net: /run/netns/wg1
onshutdown:
- name: test2
image: alpine:3.9
binds:
- /tmp:/tmp
- /check.sh:/check.sh
command: ["sh", "./check.sh", "shutdown"]
services:
# We use the non-alpine variant here because it is available as multi-arch
- name: nginx
image: nginx:1.13.7
net: /run/netns/wg0
capabilities:
- CAP_NET_BIND_SERVICE
- CAP_CHOWN
- CAP_SETUID
- CAP_SETGID
- CAP_DAC_OVERRIDE
- name: test
image: alpine:3.9
net: /run/netns/wg1
pid: host
capabilities:
- CAP_KILL
binds:
- /tmp:/tmp
- /check.sh:/check.sh
command: ["sh", "./check.sh"]
files:
- path: etc/wireguard/wg0.conf
contents: |
[Interface]
Address = 192.168.2.1/24
PrivateKey = KG7EKkHDkp7THfW5mOXcZzo3RbGAjq+ARMfJGFm5G1s=
ListenPort = 51820
[Peer]
PublicKey = ZP7h1OjA1oIAmsAvMKujp2RAAC/f0kY814b3Xq6j/0Y=
AllowedIPs = 0.0.0.0/0
Endpoint = 127.0.0.1:51821
- path: etc/wireguard/wg1.conf
contents: |
[Interface]
Address = 192.168.2.2/24
PrivateKey = SCGCKDuTm4PMOw+LXdK/2s8mxnv145QHOohKRq3vc2A=
ListenPort = 51821
[Peer]
PublicKey = AcS5t3PC5nL/oj0sYhc3yFpDlRaXoJ0mfEq6iq0rFF4=
AllowedIPs = 0.0.0.0/0
Endpoint = 127.0.0.1:51820
- path: check.sh
source: ./check.sh
trust:
org:
- linuxkit
- library