offline_docker
Offline Docker Ansible Role
Install Docker into air-gapped and offline environments. The roles is closely follows official instructions.
Requirements
- Requires Docker deb installation files somewhere on the local computer. See example how to specify
Role Variables
Check defaults/main.yml
for all variables.
How to use
- Install
ansible-galaxy install chaliy.offline_docker
- Download Docker deb files from Docker website - (https://docs.docker.com/engine/install/ubuntu/#install-from-a-package)[instructions] and put them somewhere on the local computer. For example:
wget https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/arm64/containerd.io_1.6.9-1_arm64.deb -P ./.offline/docker
wget https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/arm64/docker-ce-cli_20.10.21~3-0~ubuntu-jammy_arm64.deb -P ./.offline/docker
wget https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/arm64/docker-ce-rootless-extras_20.10.21~3-0~ubuntu-jammy_arm64.deb -P ./.offline/docker
wget https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/arm64/docker-ce_20.10.21~3-0~ubuntu-jammy_arm64.deb -P ./.offline/docker
wget https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/arm64/docker-compose-plugin_2.6.0~ubuntu-jammy_arm64.deb -P ./.offline/docker
- Specify
docker_deb_files
in your playbook - Run playbook
NOTE: offline-playbook.yml is an example playbook that downloads Docker offline
Example Playbook
- hosts: all
roles:
- role: chaliy.offline_docker
vars:
# Please note, order of deps is important
docker_deb_files:
- ./.offline/docker/containerd.io_1.6.9-1_arm64.deb
- ./.offline/docker/docker-ce-cli_20.10.21~3-0~ubuntu-jammy_arm64.deb
- ./.offline/docker/docker-ce-rootless-extras_20.10.21~3-0~ubuntu-jammy_arm64.deb
- ./.offline/docker/docker-ce_20.10.21~3-0~ubuntu-jammy_arm64.deb
- ./.offline/docker/docker-compose-plugin_2.6.0~ubuntu-jammy_arm64.deb
Development
poetry install
make test
License
MIT (Except russians)
Install
ansible-galaxy install chaliy/ansible-role-offline-docker
License
other
Downloads
23