mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-12-26 05:43:00 +00:00
80 lines
2.4 KiB
YAML
80 lines
2.4 KiB
YAML
kernel:
|
|
image: linuxkit/kernel:6.12.52
|
|
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0"
|
|
init:
|
|
- linuxkit/init:b5506cc74a6812dc40982cacfd2f4328f8a4b12a
|
|
- linuxkit/runc:3c079dfa25a05653db203c2abfb329c4e08ba6f9
|
|
- linuxkit/containerd:ba19f64efd3331a8fd0a33e00eabd14f6ee1780e
|
|
- linuxkit/ca-certificates:256f1950df59f2f209e9f0b81374177409eb11de
|
|
onboot:
|
|
- name: sysctl
|
|
image: linuxkit/sysctl:43ac1d39da329c3567fcb9689e5ca99de6d169b6
|
|
- name: dhcpcd
|
|
image: linuxkit/dhcpcd:b87e9ececac55a65eaa592f4dd8b4e0c3009afdb
|
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
|
- name: wg0
|
|
image: linuxkit/ip:3c0676ee83a0dc739685be1253b8326f08581ef7
|
|
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:3c0676ee83a0dc739685be1253b8326f08581ef7
|
|
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:a86d74c8f89be8956330c3b115b0b1f2e09ef6e0
|
|
env:
|
|
- INSECURE=true
|
|
net: /run/netns/wg1
|
|
- name: rngd
|
|
image: linuxkit/rngd:984eb580ecb63986f07f626b61692a97aacd7198
|
|
- 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
|