Installation
go get -u github.com/linuxkit/linuxkit/src/cmd/linuxkit
brew tap linuxkit/linuxkitbrew install --HEAD linuxkit
Basic use
- Yaml definition file (redis-os.yml)
# Minimal YAML to run a Redis server (used at Dockercon ') # connect:nc localhost 6379kernel:image:linuxkit /kernel:4.14.56 cmdline: "Console=tty0 console=ttys0 console=ttyama0 console=ttysclp0" Init:-Linuxkit/init : 598439400c1e4bf8c25c63c98b2d3e83b1382be9-linuxkit/runc:v0.5-linuxkit/containerd:0 784cc754edb296b996c3510abbdf69686ef0f24onboot:-name:dhcpcd image:linuxkit/dhcpcd:v0.5 command: ["/SBIN/DHCPCD", "--nobackground", "-F", "/dhcpcd.conf", "1"]services:-Name:getty image:linuxkit/getty:v0.5 env:-Insecur E=true # currently Redis:4.0.6-alpine have trust issue with Multi-arch # Https://github.com/docker-library/official-image S/issues/3794-name:redis Image:redis:4.0.5-alpine Capabilities:-Cap_net_bind_service-cap_chown -Cap_setuid-cap_setgid-cap_dac_override net:hosttrust:org:-Linuxkit-library
- Build
It's going to be a little slow, wait a minute.
linuxkit build redis-os.yml
linuxkit run redis-os
Effect
├── redis-os-cmdline├── redis-os-initrd.img├── redis-os-kernel└── redis-os.yaml
Resources
Https://github.com/linuxkit/linuxkit
Https://github.com/linuxkit/linuxkit/tree/master/examples
Linuxkit Basic Trial