kajoca / ansible-role-docker_arm

Ansible Role - Docker for ARM and Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ansible Role: Docker for ARM

Build Status

An Ansible Role that installs Docker on Linux, specially tailored for ARM-based computers like the Raspberry Pi.

If you need a more flexible and generic role for Docker, check out geerlingguy.docker.

Role Usage in Real-world projects

Besides the documentation here, please see the Raspberry Pi Dramble for an example of this role in action, being used with multiple Raspberry Pis to build a Kubernetes cluster, or Drupal Pi for an example of use with a single Raspberry Pi.

Requirements

If installing Docker Compose, requires Python Pip already be installed (you can use geerlingguy.pip to install it).

Role Variables

Available variables are listed below, along with default values (see defaults/main.yml):

docker_version: 5:18.09.0~3-0~raspbian-stretch

The version of Docker to install. Check for available versions with apt-cache madison docker-ce.

docker_install_compose: true

Whether to install Docker Compose via Pip.

docker_users:
  - user1
  - user2

A list of system users to be added to the docker group (so they can use Docker on the server).

Use with Ansible (and docker Python library)

Many users of this role wish to also use Ansible to then build Docker images and manage Docker containers on the server where Docker is installed. In this case, you can easily add in the docker Python library using the geerlingguy.pip role:

- hosts: rpi

  vars:
    pip_install_packages:
      - name: docker

  roles:
    - geerlingguy.pip
    - geerlingguy.docker_arm

Dependencies

None.

Example Playbook

- hosts: rpi
  roles:
    - geerlingguy.pip
    - geerlingguy.docker_arm

License

MIT / BSD

Author Information

This role was created in 2019 by Jeff Geerling, author of Ansible for DevOps.

About

Ansible Role - Docker for ARM and Pi

License:MIT License