Skip to content
Container Machines - Containers that look like Virtual Machines
Branch: master
Clone or download
dlespiau Merge pull request #149 from karnauskas/status-cmd
Add status alias to show command
Latest commit 27b304f Apr 19, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples example showing the use of hostPort Mar 27, 2019
images Add sudo to clearlinux & debian10 images Apr 17, 2019
tests Tests Apr 19, 2019
.goreleaser.yml build: Release tarballs for macOS it's a prerequisite for brew Mar 19, 2019
.travis.yml ci: Also login in the tagging deploy script Mar 19, 2019
config.go config: Add a create sub-command Feb 12, 2019
defaults.go config: Use tagged iamages on release Mar 19, 2019
footloose.go footloose: Instruct Cobra we want to handle displaying the error ours… Feb 12, 2019
go.sum Version command: Apr 16, 2019 make-image: Fix typo in help text Mar 14, 2019
ssh.go all: Move from to Mar 1, 2019
start.go Cluster Start Stop Apr 12, 2019
stop.go Cluster Start Stop Apr 12, 2019

Build Status Go Report Card GoDoc


footloose creates containers that look like virtual machines. Those containers run systemd as PID 1 and a ssh daemon that can be used to login into the container. Such "machines" behave very much like a VM, it's even possible to run dockerd in them :)

footloose can be used for a variety of tasks, wherever you'd like virtual machines but want fast boot times or need many of them. An easy way to think about it is: Vagrant, but with containers.

footloose in action:



footloose binaries can be downloaded from the release page:


curl -Lo footloose
chmod +x footloose
sudo mv footloose /usr/local/bin/


On macOS we provide a direct download and a homebrew tap:

curl --silent --location | tar xz
sudo mv footloose /usr/local/bin


brew tap weaveworks/tap
brew install weaveworks/tap/footloose

From source

Alternatively, build and install footloose from source. It requires having go >= 1.11 installed:

GO111MODULE=on go get


footloose reads a description of the Cluster of Machines to create from a file, by default named footloose.yaml. The config command helps with creating the initial config file:

# Create a footloose.yaml config file. Instruct we want to create 3 machines.
footloose config create --replicas 3

Start the cluster:

$ footloose create
INFO[0000] Pulling image: ...
INFO[0007] Creating machine: cluster-node0 ...
INFO[0008] Creating machine: cluster-node1 ...
INFO[0008] Creating machine: cluster-node2 ...

It only takes a second to create those machines. The first time create runs, it will pull the docker image used by the footloose containers so it will take a tiny bit longer.

SSH into a machine with:

$ footloose ssh root@node1
[root@1665288855f6 ~]# ps fx
    1 ?        Ss     0:00 /sbin/init
   23 ?        Ss     0:00 /usr/lib/systemd/systemd-journald
   58 ?        Ss     0:00 /usr/sbin/sshd -D
   59 ?        Ss     0:00  \_ sshd: root@pts/1
   63 pts/1    Ss     0:00      \_ -bash
   82 pts/1    R+     0:00          \_ ps fx
   62 ?        Ss     0:00 /usr/lib/systemd/systemd-logind

Choosing the OS image to run

footloose will default to running a centos 7 container image. The --image argument of config create can be used to configure the OS image. Valid OS images are:


For example:

footloose config create --replicas 3 --image

Ubuntu images need the --privileged flag:

footloose config create --replicas 1 --image --privileged


footloose config create creates a footloose.yaml configuration file that is then used by subsequent commands such as create, delete or ssh. If desired, the configuration file can be named differently and supplied with the -c, --config option.

$ footloose config create --replicas 3
$ cat footloose.yaml
  name: cluster
  privateKey: cluster-key
- count: 3
    name: node%d
    - containerPort: 22

This configuration can naturally be edited by hand. The full list of available parameters are in the reference documentation.


Interesting things can be done with footloose!

Running dockerd in Container Machines

To run dockerd inside a docker container, two things are needed:

  • Run the container as privileged (we could probably do better! expose capabilities instead!).
  • Mount /var/lib/docker as volume, here an anonymous volume. This is because of a limitations of what you can do with the overlay systems docker is setup to use.
  name: cluster
  privateKey: cluster-key
- count: 1
    name: node%d
    - containerPort: 22
    privileged: true
    - type: volume
      destination: /var/lib/docker

You can then install and run docker on the machine:

$ footloose create
$ footloose ssh root@node0
# yum install -y docker iptables
# systemctl start docker
# docker run busybox echo 'Hello, World!'
Hello, World!

Under the hood

Under the hood, Container Machines are just containers. They can be inspected with docker:

$ docker ps
CONTAINER ID    IMAGE                        COMMAND         NAMES
04c27967f76e    "/sbin/init"    cluster-node2
1665288855f6    "/sbin/init"    cluster-node1
5134f80b733e    "/sbin/init"    cluster-node0

The container names are derived from and cluster.machines[].name.

They run systemd as PID 1, it's even possible to inspect the boot messages:

$ docker logs cluster-node1
systemd 219 running in system mode.
Detected virtualization docker.
Detected architecture x86-64.

Welcome to CentOS Linux 7 (Core)!

Set hostname to <1665288855f6>.
Initializing machine ID from random generator.
Failed to install release agent, ignoring: File exists
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice System Slice.
[  OK  ] Reached target Slices.
[  OK  ] Listening on Journal Socket.
[  OK  ] Reached target Local File Systems.
         Starting Create Volatile Files and Directories...
[  OK  ] Listening on Delayed Shutdown Socket.
[  OK  ] Reached target Swap.
[  OK  ] Reached target Paths.
         Starting Journal Service...
[  OK  ] Started Create Volatile Files and Directories.
[  OK  ] Started Journal Service.
[  OK  ] Reached target System Initialization.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Timers.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Basic System.
         Starting OpenSSH Server Key Generation...
         Starting Cleanup of Temporary Directories...
[  OK  ] Started Cleanup of Temporary Directories.
[  OK  ] Started OpenSSH Server Key Generation.
         Starting OpenSSH server daemon...
[  OK  ] Started OpenSSH server daemon.
[  OK  ] Reached target Multi-User System.


Is footloose just like LXD?

In principle yes, but it will also work with Docker container images and on MacOS as well.


We are a very friendly community and love questions, help and feedback.

If you have any questions, feedback, or problems with footloose:

Your feedback is always welcome!

You can’t perform that action at this time.