mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-01-13 17:06:35 +00:00
93 lines
2.5 KiB
YAML
93 lines
2.5 KiB
YAML
kernel:
|
|
image: linuxkit/kernel:4.9.54
|
|
cmdline: "console=ttyS0"
|
|
init:
|
|
- linuxkit/init:98e95fb67e8afcf02c09ba927e4b357fec42977a
|
|
- linuxkit/runc:991ef358ad8fc1111d64f4d8071f2009cc561f6a
|
|
- linuxkit/containerd:eaf0d615cfceb9d854408dd3c80429ee8ac4d051
|
|
- linuxkit/ca-certificates:ea3c4c120f929f4f07ac8535d75933365b5e9582
|
|
onboot:
|
|
- name: dhcpcd
|
|
image: linuxkit/dhcpcd:aa685261ceb2557990dcfe9dd8824c6b9ec416e2
|
|
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
|
|
- name: wg0
|
|
image: linuxkit/ip:7a82871df06767cfe26a04d0ed6bee1031ba5d04
|
|
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:7a82871df06767cfe26a04d0ed6bee1031ba5d04
|
|
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.6
|
|
binds:
|
|
- /tmp:/tmp
|
|
- /check.sh:/check.sh
|
|
command: ["sh", "./check.sh", "shutdown"]
|
|
services:
|
|
- name: nginx
|
|
image: nginx:alpine
|
|
net: /run/netns/wg0
|
|
capabilities:
|
|
- CAP_NET_BIND_SERVICE
|
|
- CAP_CHOWN
|
|
- CAP_SETUID
|
|
- CAP_SETGID
|
|
- CAP_DAC_OVERRIDE
|
|
- name: test
|
|
image: alpine:3.6
|
|
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
|