Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

Latest commit

 

History

History
40 lines (34 loc) · 969 Bytes

README.md

File metadata and controls

40 lines (34 loc) · 969 Bytes

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 limitations of what you can do with the overlay system docker is setup to use.
cluster:
  name: cluster
  privateKey: cluster-key
machines:
- count: 1
  spec:
    image: quay.io/footloose/centos7
    name: node%d
    portMappings:
    - containerPort: 22
    privileged: true
    volumes:
    - 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!