How to Make Slider in HTML and CSS: 3 Easy Steps
Sliders or carousels are essential components for modern web design, offering an engaging way to showcase content, images, or products. Knowing how to make slider in HTML and CSS is a crucial skill for web developers and designers alike. Sl...

11 min read
Sliders or carousels are essential components for modern web design, offering an engaging way to showcase content, images, or products. Knowing how to make slider in HTML and CSS is a crucial skill for web developers and designers alike. Sl...
- Prerequisites
- How to Install Docker on Ubuntu
- Installing a Specific Version of Docker
Docker is a revolutionary open-source containerization platform that has redefined the way applications are built, tested, and deployed. It enables developers to package an application and its dependencies into a portable container that runs consistently across diverse environments, whether on local development machines, servers, or cloud-based platforms.
This guide provides a comprehensive step-by-step tutorial on how to install Docker on Ubuntu, ensuring you get the latest version for your projects.
Prerequisites
Before starting the installation, ensure the following:
- Supported Ubuntu Version: You are using a compatible Ubuntu version, such as Ubuntu 23.10, 22.04, or 20.04.
- User Privileges: You have a user account with
sudoprivileges to execute administrative commands. - Updated System: Your systemâs package index is up-to-date to avoid compatibility issues.
How to Install Docker on Ubuntu
Step 1: Update Your System
The first step is to update your system. Keeping your system updated ensures that you have the latest security patches and compatibility improvements. Open a terminal and run:
sudo apt update sudo apt upgrade -y
This command updates the package index and upgrades all outdated packages.
Step 2: Install Required Dependencies
Docker requires certain dependencies to be installed before proceeding with the installation. Install them using the following command:
sudo apt install -y ca-certificates curl gnupg
These dependencies ensure secure communication with Dockerâs repository and the ability to manage cryptographic keys.
Step 3: Add Dockerâs GPG Key
The GPG key verifies the authenticity of the Docker packages. Add the key to your system using these commands:
sudo mkdir -p /etc/apt/keyrings sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
This step ensures that the packages you install are trusted and secure.
Step 4: Add Dockerâs Official Repository
To install the latest version of Docker, add its official repository to your systemâs APT sources list. Execute the following command:
echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | \ sudo tee /etc/apt/sources.list.d/docker.list
The command dynamically fetches your Ubuntu codename (e.g., jammy for Ubuntu 22.04) and configures the repository.
Step 5: Install Docker
After adding Dockerâs repository, update your package index again to include it and install Docker:
sudo apt update sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
This command installs Docker along with its essential plugins, ensuring you have all the tools needed to work with containers.
Step 6: Verify Docker Installation
To confirm that Docker was installed successfully and is running, check its status using:
sudo systemctl status docker
The output should indicate that Docker is active and running. Additionally, verify the installed version with:
docker --version
This displays the current Docker version installed on your system.
Step 7: Enable Non-Root User Access to Docker
By default, only users with sudo privileges can run Docker commands. To allow a non-root user to execute Docker commands, add the user to the Docker group:
sudo usermod -aG docker $USER
Here, $USER is an environment variable representing the current username. If you want to add another user, replace $USER with the username. After executing the command, log out and log back in to apply the changes.
Step 8: Test Docker Installation
To ensure Docker is working correctly, run a test container:
docker container run hello-world
This command:
- Downloads the
hello-worldtest image from Docker Hub (if not already available locally). - Runs the container, which outputs a "Hello from Docker" message.
If the message appears, your Docker installation is successful.
Installing a Specific Version of Docker
Sometimes, you may need to install a specific version of Docker. First, list all available versions in Dockerâs repository:
sudo apt update apt list -a docker-ce
Identify the desired version and install it by specifying the version string. For example:
DOCKER_VERSION=5:26.0.0-1~ubuntu.22.04~jammy sudo apt-get install docker-ce=$DOCKER_VERSION docker-ce-cli=$DOCKER_VERSION containerd.io docker-buildx-plugin docker-compose-plugin
This ensures youâre installing the exact version required for your project.
Updating Docker
To update Docker to the latest version, use the following commands:
sudo apt update && sudo apt upgrade
If you wish to prevent Docker from being updated automatically, mark it as held back:
sudo apt-mark hold docker-ce
This is useful in environments where maintaining a specific version is critical.
Uninstalling Docker
If you need to remove Docker, follow these steps. First, stop all running containers and clean up resources:
docker container stop $(docker container ls -aq) docker system prune -a --volumes
Next, uninstall Docker:
sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin sudo apt autoremove
To completely remove Dockerâs files and directories, run:
sudo rm -rf /var/lib/{docker,containerd}
This removes all traces of Docker from your system.
You may also like:
Conclusion
In this guide, we have provided detailed instructions on how to install Docker on Ubuntu. From setting up Dockerâs repository to running your first test container, you now have all the tools to harness Dockerâs full potential. Dockerâs portability, scalability, and efficiency make it a cornerstone of modern software development and DevOps practices.
For further exploration, visit Dockerâs official documentation or engage with its active community forums. If you encounter any challenges during installation, leave a comment or seek assistance from Dockerâs robust user community.
By following this guide, youâre ready to leverage the power of Docker to streamline your development and deployment workflows, unlocking new possibilities for innovation and efficiency.
Website Vidya Team
Technology educator and researcher at Website Vidya.
Related Technical Guides
Tested runbooks, server administration walkthroughs, and troubleshooting guides











Discussion
0No comments on this guide yet. Be the first to share your thoughts or ask a question!