Advanced topics

rkt

rkt is a next-generation container manager for Linux clusters. In contrast to the Docker daemon, rkt is a single binary that is currently available on CoreOS and Kubernetes only. It is designed for modern Linux clusters environments.

To reference a Docker image, use the docker:// prefix when fetching or running images.

$ rkt --insecure-options=image run docker://biocontainers/comet

According to the original documentation:

This behaves similarly to the Docker client, if no specific registry is named, the Docker Hub is used by default. As with Docker, alternative registries can be used by specifying the registry as part of the image reference.

Docker useful tips

Bash interactive script

In this example:

Note

-t flag assigns a pseudo-tty or terminal inside the new container. -i flag allows you to make an interactive connection by grabbing the standard in (STDIN) of the container. /bin/bash launches a Bash shell inside our container.

Let’s try running some commands inside the container:

In this example ls displays the directory listing of the root directory inside the container.

Note

When completed, run the exit command or enter Ctrl-D to exit the interactive shell.

Start a daemonized Hello world

Let’s create a container that runs as a daemon.

Note

-d flag runs the container in the background (to daemonize it). The command /bin/sh -c "while true; do echo hello world; sleep 1; done" run the container in an infinite loop.

We can use this container ID to see what’s happening with our hello world daemon. First, let’s make sure our container is running. Run the docker ps command. The docker ps command queries the Docker daemon for information about all the containers it knows about.