Jump to content

Install/Upgrade/Uninstall Docker

(0 reviews)

jointoday-darklight.pngGuides: Subscribers Workshop: Install/Upgrade/Uninstall Docker

If you have tried installing docker to your system but failed to follow the docker.com docs then please do the following.

Now before starting, a rule of thumb, make sure your system is up to date.

Basic Set-up for installing docker.

Step 1. Update the host.

$ apt update
 

Step 2. Upgrade the host.

$ apt upgrade -y
 

Step 3. Install curl.

$ apt install curl

Step 3. Install Docker.

$ curl -sSL https://get.docker.com | sh

Step 5 Check if Docker is functioning.

$ systemctl status docker

Upgrade Docker Engine

To upgrade Docker Engine, download the newer package files and repeat the installation procedure, pointing to the new files.

Tip

Preview script steps before running. You can run the script with the --dry-run option to learn what steps the script will run when invoked:

$ curl -fsSL https://get.docker.com -o get-docker.sh 
 
$ sudo sh ./get-docker.sh --dry-run

This example downloads the script from https://get.docker.com/ and runs it to install the latest stable release of Docker on Linux:

$ curl -fsSL https://get.docker.com -o get-docker.sh
$ sudo sh get-docker.sh

Executing docker install script, commit: 7cae5f8b0decc17d6571f9f52eb840fbc13b2737
<...>

You have now successfully installed and started Docker Engine. The docker service starts automatically on Debian based distributions. On RPM based distributions, such as CentOS, Fedora, RHEL or SLES, you need to start it manually using the appropriate systemctl or service command. As the message indicates, non-root users can't run Docker commands by default.

Uninstall Docker Engine

  1. Uninstall the Docker Engine, CLI, containerd, and Docker Compose packages:

$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin docker-ce-rootless-extras
  1. Images, containers, volumes, or custom configuration files on your host aren't automatically removed. To delete all images, containers, and volumes:

$ sudo rm -rf /var/lib/docker

$ sudo rm -rf /var/lib/containerd
  1. Remove source list and keyrings

$ sudo rm /etc/apt/sources.list.d/docker.list

$ sudo rm /etc/apt/keyrings/docker.asc

You have to delete any edited configuration files manually.


Referenced: https://docs.docker.com/engine/install/debian/

Guides: Subscribers Workshop: Install/Upgrade/Uninstall Docker

jointoday-darklight.png

User Feedback

There are no reviews to display.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.