Pieter's Page

Dive deep in Software, Cloud, Security, and DevOps

Installing Docker – Ubuntu

Install Docker Engine for the first time on a new host machine through apt repository.

  • Warning – Firewall limitations:
  • If you use ufw or firewalld to manage firewall settings, be aware that when you expose container ports using Docker, these ports bypass your firewall rules. For more information, refer to Docker and ufw.
  • Docker is only compatible with iptables-nft and iptables-legacy. Firewall rules created with nft are not supported on a system with Docker installed. Make sure that any firewall rulesets you use are created with iptables or ip6tables, and that you add them to the DOCKER-USER chain, see Packet filtering and firewalls.

1. Set up Docker’s apt repository

2. Install Docker Packages

3. Verify Installation