Don’t stop now! The next scenario will only take about 10 minutes to complete.

CoreOS Rkt - Hello World

The following command launches a Interactive Rkt container using the ubuntu:16.04 Docker Image. This will launch bash by default. The “–insecure-options=image” property is required because Docker images can’t be verified by rkt.

sudo rkt run --interactive docker://ubuntu:16.04 --net=host --insecure-options=image --dns 8.8.8.8

Alpine does not define a default command to run. Image arguments are provided after the --, in this case it's to launch the process ash.

sudo rkt run --interactive quay.io/coreos/alpine-sh --insecure-options=image

Local images: rkt image list

Running containers: rkt list

Containers can be run in the background using systemd-run. Rkt relies on the system init system for managing background containers.

sudo systemd-run rkt run docker://nginx:alpine --port=80-tcp:80 --insecure-options=image

Once the images have downloaded, it will serve requests. Test using curl localhost

Logs can be accessed via journalctl -u <service-name> provided by systemd-run.