A package manager is a group of software tools ,It automates the installation process, upgrading process, configuration process, and removing process of the computer programs for an operating system of the computer in an efficient manner.
Packages include metadata like the name of the software, description of its objective, checksum, dependency list, vendor, and version number required for the software to properly run.
All package managers depend on the metadata and format of the packages they could manage e.g .deb, .rpm packages
RPM has Yum and DNF package managers. For DEB, you have apt-get, aptitude command line based package managers.
Docker Installation using apt-get :
- Update the system
sudo apt-get update
Install Dependencies
Some dependencies are needed for the installation to go along seamlessly
$ sudo apt install apt-transport-https curl gnupg-agent ca-certificates software-properties-common -y
Install Docker on Ubuntu 22.04
We will install the Docker Community Edition ( Docker CE ) which is opensource and free to download and use
To do so, we will add the GPGK key :
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Add the repository for Ubuntu 20.04 Stable
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"
sudo apt install docker-ce docker-ce-cli containerd.io -y
This installs Docker and all the additional packages, libraries, and dependencies required by Docker and associated packages .
Add the currently logged-in user to the docker group
$ sudo usermod -aG docker $USER
Confirm Docker is installed
$ docker version
systemctl and systemd
systemctl is used to examine and control the state of “systemd” system and service manager
systemd is system and service manager for Unix like operating systems
If you see active (running)
in green, the Docker daemon is running and your containers should be up.
An active state of inactive
indicates the service has stopped. Try to bring it up by running sudo systemctl start docker
Happy Learning !!