DEV Community

Anirban Das
Anirban Das

Posted on

Docker: Installation on Amazon Linux 2 or Amazon Linux 2023

Docker supports multiple platforms to install. It supports Windows, Linux and MAC through Docker Desktop. For detailed instructions, please check -

Linux: https://docs.docker.com/desktop/install/linux-install/
MAC: https://docs.docker.com/desktop/install/mac-install/
Windows: https://docs.docker.com/desktop/install/windows-install/

Docker supports multiple linux distributions -

  • CentOS
  • Debian
  • fedora
  • RHEL
  • Ubuntu

Installation :

  • Before installation, please make sure kernel is updated -
sudo yum update -y
Enter fullscreen mode Exit fullscreen mode
  • Install the most Docker Community Edition Package -
sudo yum install docker -y
Enter fullscreen mode Exit fullscreen mode
  • Once installed, then check the status -
[root@docker ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: https://docs.docker.com
Enter fullscreen mode Exit fullscreen mode
  • Start the docker service -
[root@docker ~]# systemctl start docker
[root@docker ~]# systemctl status docker
● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
   Active: active (running) since Sun 2024-09-01 15:46:41 UTC; 2s ago
     Docs: https://docs.docker.com
  Process: 5963 ExecStartPre=/usr/libexec/docker/docker-setup-runtimes.sh (code=exited, status=0/SUCCESS)
  Process: 5962 ExecStartPre=/bin/mkdir -p /run/docker (code=exited, status=0/SUCCESS)
 Main PID: 5966 (dockerd)
    Tasks: 7
   Memory: 27.5M
   CGroup: /system.slice/docker.service
           └─5966 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock --default-ulimit nofile=32768:65536

Sep 01 15:46:40 docker systemd[1]: Starting Docker Application Container Engine...
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.754619713Z" level=info msg="Starting up"
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.810097673Z" level=info msg="Loading containers: start."
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.979307711Z" level=info msg="Loading containers: done."
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.990747588Z" level=warning msg="WARNING: bridge-nf-call-iptables is disabled"
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.991061355Z" level=warning msg="WARNING: bridge-nf-call-ip6tables is disabled"
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.991263475Z" level=info msg="Docker daemon" commit=b08a51f containerd-snapshotter=...on=25.0.6
Sep 01 15:46:40 docker dockerd[5966]: time="2024-09-01T15:46:40.991518728Z" level=info msg="Daemon has completed initialization"
Sep 01 15:46:41 docker dockerd[5966]: time="2024-09-01T15:46:41.020791488Z" level=info msg="API listen on /run/docker.sock"
Sep 01 15:46:41 docker systemd[1]: Started Docker Application Container Engine.
Hint: Some lines were ellipsized, use -l to show in full.
Enter fullscreen mode Exit fullscreen mode
  • Enable the docker service -
[root@docker ~]# systemctl enable docker
Created symlink from /etc/systemd/system/multi-user.target.wants/docker.service to /usr/lib/systemd/system/docker.service.
Enter fullscreen mode Exit fullscreen mode

For installation in other distros, see below link -

Install | Docker Docs

Learn how to choose the best method for you to install Docker Engine. This client-server application is available on Linux, Mac, Windows, and as a static binary.

favicon docs.docker.com

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay