rkt beginner notes

Since I collect abandonware container systems:

getting started with rkt

from quay, the coreos dockerhub competitor-

# sudo rkt fetch quay.io/coreos/alpine-sh
# sudo rkt run --interactive quay.io/coreos/alpine-sh --exec=/bin/sh

from dockerhub-

# sudo rkt --insecure-options=image fetch docker://alpine
# sudo rkt run --interactive docker://alpine --exec=/bin/sh

the dockerhub stuff also creates a fake rkt registry for docker-

# sudo rkt run --interactive registry-1.docker.io/library/alpine --exec=/bin/sh

will also work.

Finally, Quay mirrors the default Docker library under quay.io/dockerlibrary, so

# sudo rkt fetch quay.io/dockerlibrary/debian:9

Gets you debian.

mounted volumes

syntax got me for a while, key is to realize the inside/outside distinction-

# rkt run --volume logs,kind=host,source=/srv/logs \
    example.com/app1 --mount volume=logs,target=/var/log \
    example.com/app2 --mount volume=logs,target=/opt/log

“volume” is outside, “mount” is inside, easy-peasy.

quality of life things

Clean everything up real quick-

rkt gc --grace-period=0s