Guides: 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 curlStep 3. Install Docker.
$ curl -sSL https://get.docker.com | shStep 5 Check if Docker is functioning.
$ systemctl status dockerUpgrade 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
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-extrasImages, 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/containerdRemove source list and keyrings
$ sudo rm /etc/apt/sources.list.d/docker.list
$ sudo rm /etc/apt/keyrings/docker.ascYou have to delete any edited configuration files manually.
Referenced: https://docs.docker.com/engine/install/debian/
Guides: Subscribers Workshop: Install/Upgrade/Uninstall Docker
There are no reviews to display.