Install Docker into air-gapped and offline environments. The roles is closely follows official instructions.
- Requires Docker deb installation files somewhere on the local computer. See example how to specify
Check defaults/main.yml
for all variables.
- 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
- 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
poetry install
make test
MIT (Except russians)