mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-09-19 01:17:18 +00:00
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
kernel:
|
|
image: linuxkit/kernel:6.6.13
|
|
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
|
init:
|
|
- linuxkit/init:e120ea2a30d906bd1ee1874973d6e4b1403b5ca3
|
|
- linuxkit/runc:6062483d748609d505f2bcde4e52ee64a3329f5f
|
|
- linuxkit/containerd:39301e7312f13eedf19bd5d5551af7b37001d435
|
|
- linuxkit/ca-certificates:5aaa343474e5ac3ac01f8b917e82efb1063d80ff
|
|
onboot:
|
|
- name: sysctl
|
|
image: linuxkit/sysctl:5a374e4bf3e5a7deeacff6571d0f30f7ea8f56db
|
|
- name: dhcpcd
|
|
image: linuxkit/dhcpcd:e9e3580f2de00e73e7b316a007186d22fea056ee
|
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
|
- name: wg0
|
|
image: linuxkit/ip:bb250017b05de5e16ac436b1eb19a39c87b5a252
|
|
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:bb250017b05de5e16ac436b1eb19a39c87b5a252
|
|
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
|
|
services:
|
|
- name: getty
|
|
image: linuxkit/getty:5d86a2ce2d890c14ab66b13638dcadf74f29218b
|
|
env:
|
|
- INSECURE=true
|
|
net: /run/netns/wg1
|
|
- name: rngd
|
|
image: linuxkit/rngd:83a6481f04da73e710c1d416355920b8ff4dc1dd
|
|
- name: nginx
|
|
image: nginx:1.13.8-alpine
|
|
net: /run/netns/wg0
|
|
capabilities:
|
|
- CAP_NET_BIND_SERVICE
|
|
- CAP_CHOWN
|
|
- CAP_SETUID
|
|
- CAP_SETGID
|
|
- CAP_DAC_OVERRIDE
|
|
files:
|
|
- path: etc/wireguard/wg0.conf
|
|
contents: |
|
|
[Interface]
|
|
Address = 192.168.2.1/24
|
|
DNS = 192.168.2.2
|
|
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
|