{"id":2568,"date":"2024-01-30T17:30:10","date_gmt":"2024-01-30T12:00:10","guid":{"rendered":"https:\/\/www.veeble.org\/kb\/?p=2568"},"modified":"2025-04-11T14:52:11","modified_gmt":"2025-04-11T09:22:11","slug":"how-to-install-and-use-docker-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/how-to-install-and-use-docker-on-ubuntu\/","title":{"rendered":"How to Install And Use Docker on Ubuntu"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1.png\" target=\"_blank\" rel=\"noopener\"><img fetchpriority=\"high\" decoding=\"async\" width=\"1024\" height=\"566\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-1024x566.png\" alt=\"docker\" class=\"wp-image-2588\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-1024x566.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-300x166.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-768x425.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-1536x850.png 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-2048x1133.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p><a href=\"https:\/\/www.docker.com\/\" target=\"_blank\" rel=\"noopener\">Docker <\/a>is an incredibly powerful tool that has reshaped how we think about developing, deploying, and running applications. By using Docker, developers can easily package their applications and dependencies into a <a href=\"https:\/\/www.docker.com\/resources\/what-container\/\" target=\"_blank\" rel=\"noopener\">container<\/a>, which can then be universally run on any system that has Docker installed. This containerization aspect not only simplifies development and testing across different environments but also streamlines deployment. In this guide, we&#8217;ll focus to install Docker on an Ubuntu operating system, which is one of the <a href=\"https:\/\/www.google.com\/search?q=most+popular+linux+distributions&amp;rlz=1C1CHBF_enIN1071IN1071&amp;oq=most+popular+Linux+distributions&amp;gs_lcrp=EgZjaHJvbWUqBwgAEAAYgAQyBwgAEAAYgAQyBwgBEAAYgAQyBwgCEAAYgAQyCAgDEAAYFhgeMggIBBAAGBYYHjIICAUQABgWGB4yCAgGEAAYFhgeMggIBxAAGBYYHjIICAgQABgWGB4yCAgJEAAYFhgeqAIAsAIA&amp;sourceid=chrome&amp;ie=UTF-8\" target=\"_blank\" rel=\"noopener\">most popular Linux distributions<\/a> and well known for its ease of use. Whether you\u2019re setting up a personal project, a professional development environment, or a production server, getting Docker up and running on Ubuntu is a great first step.<\/p>\n\n\n\n<p>Docker containers are lightweight, especially compared to traditional virtual machines, as they do not need the extra load of a hypervisor since they run directly within the host machine&#8217;s kernel. This means that you can run more containers on a given hardware combination than if you were using virtual machines. Docker also ensures consistency across multiple development, release cycles, and standardizes your environment.<\/p>\n\n\n\n<p>One of the key features of Docker is its <a href=\"https:\/\/docs.docker.com\/get-started\/overview\/#:~:text=Docker&#039;s%20container%2Dbased%20platform%20allows,in%20a%20mixture%20of%20environments.\" target=\"_blank\" rel=\"noopener\">portability<\/a>. Any computer, any infrastructure, and any cloud can run containers. This makes it very easy to move your applications around and run them wherever it is most convenient or cost-effective.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"steps-to-install-docker\">Steps to Install Docker<\/h2>\n\n<h3 class=\"wp-block-heading\" id=\"1-update-software-repositories\">1. Update Software Repositories<\/h3>\n\n\n<p>Before installing new software, it&#8217;s a good practice to update the package repository. By doing this, you can be certain that the software is up to date.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# apt-get update<\/code><\/pre>\n\n\n<h3 class=\"wp-block-heading\" id=\"2-install-docker\">2. Install Docker<\/h3>\n\n\n<p>Docker is available in the standard Ubuntu repository, but it might not always be the latest version. To install the latest version, install Docker from the official <a href=\"https:\/\/hub.docker.com\/_\/registry\" target=\"_blank\" rel=\"noopener\">Docker repository<\/a>.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"21-install-dependencies\">2.1 Install Dependencies<\/h4>\n\n\n<p>First, install packages to allow <code>apt<\/code> to use a repository over HTTPS:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# apt install apt-transport-https ca-certificates curl software-properties-common -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-dep.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"985\" height=\"352\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-dep.png\" alt=\"repository of docker\" class=\"wp-image-2571\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-dep.png 985w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-dep-300x107.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-dep-768x274.png 768w\" sizes=\"(max-width: 985px) 100vw, 985px\" \/><\/a><\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"22-add-dockers-official-gpg-key\">2.2 Add Docker\u2019s Official GPG Key<\/h4>\n\n\n<p>A GPG key confirms a software package&#8217;s legitimacy. To add the GPG key for the Docker repository to your system, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add -<\/code><\/pre>\n\n\n\n<p>The output of this command should be &nbsp;<strong><code>OK<\/code><\/strong>, which means authenticity is verified. <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-ok.png\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"983\" height=\"105\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-ok.png\" alt=\"GPG key\" class=\"wp-image-2570\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-ok.png 983w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-ok-300x32.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-ok-768x82.png 768w\" sizes=\"(max-width: 983px) 100vw, 983px\" \/><\/a><\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"23-add-docker-repository-to-ubuntu\">2.3 Add Docker Repository to Ubuntu<\/h4>\n\n\n<p>Add the Docker repository to the apt source.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# add-apt-repository \"deb &#91;arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\"<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-repo.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"375\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-repo-1024x375.png\" alt=\"add docker repository\" class=\"wp-image-2572\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-repo-1024x375.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-repo-300x110.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-repo-768x281.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-repo-1536x563.png 1536w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-repo.png 1540w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"24-ensure-the-correct-source\">2.4 <strong>Ensure the Correct Source<\/strong><\/h4>\n\n\n<p>Confirm that the Docker packages are being sourced from the Docker repository rather than the default Ubuntu repository. If the Docker repository is correctly set up, it should appear in the version table with the candidate version pointing to it.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# apt-cache policy docker-ce<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-cache.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"455\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-cache-1024x455.png\" alt=\"apt-cache\" class=\"wp-image-2573\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-cache-1024x455.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-cache-300x133.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-cache-768x341.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-cache.png 1159w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"25-install-docker\">2.5 Install Docker<\/h4>\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# apt install docker-ce -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/install-docker.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"969\" height=\"557\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/install-docker.png\" alt=\"install docker\" class=\"wp-image-2574\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/install-docker.png 969w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/install-docker-300x172.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/install-docker-768x441.png 768w\" sizes=\"(max-width: 969px) 100vw, 969px\" \/><\/a><\/figure>\n\n\n<h3 class=\"wp-block-heading\" id=\"3-verify-docker-installation\">3. Verify Docker Installation<\/h3>\n\n\n<p>To verify that Docker has been installed successfully and is running, execute:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# systemctl status docker<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-status.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"437\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/docker-status-1024x437.png\" alt=\"docker status\" class=\"wp-image-2575\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-status-1024x437.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-status-300x128.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-status-768x327.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/docker-status.png 1196w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>This indicates that docker is running.<\/p>\n\n\n\n<p>Now, we have successfully installed Docker on your Ubuntu system. We can now begin using Docker to create, manage, and run containers.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"getting-started-with-docker-on-ubuntu\">Getting Started with Docker on Ubuntu<\/h2>\n\n\n<p>To display basic usage information, including a list of the most common commands available in Docker.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;root@ervintest ~]# docker<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131713-1.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"783\" height=\"714\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131713-1.png\" alt=\"\" class=\"wp-image-2577\" style=\"width:671px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131713-1.png 783w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131713-1-300x274.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131713-1-768x700.png 768w\" sizes=\"(max-width: 783px) 100vw, 783px\" \/><\/a><\/figure>\n\n\n\n<p>This information can serve as a quick reference guide to various Docker commands and their purposes.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"1-running-a-docker-container\">1. Running a Docker Container<\/h4>\n\n\n<p>The most basic Docker operation is running a container. You can do this using the <code>docker run<\/code> command. For example, to run a simple Hello World container, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# docker run hello-world<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131843.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"954\" height=\"640\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131843.png\" alt=\"docker example\" class=\"wp-image-2578\" style=\"width:687px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131843.png 954w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131843-300x201.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131843-768x515.png 768w\" sizes=\"(max-width: 954px) 100vw, 954px\" \/><\/a><\/figure>\n\n\n\n<p>This command pulls the <code>hello-world<\/code> image from Docker Hub (if it&#8217;s not already on your system) and runs it in a new container. The container executes the program packaged with the image, which in this case, simply prints a message.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"2-searching-for-docker-images\">2. Searching for Docker Images<\/h4>\n\n\n<p>Docker Hub is a repository for Docker images. You can search for images directly from the command line. For example, to search for the Ubuntu image, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# docker search ubuntu<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131953.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"328\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131953-1024x328.png\" alt=\"docker ubuntu\" class=\"wp-image-2579\" style=\"width:780px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131953-1024x328.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131953-300x96.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131953-768x246.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/Screenshot-2024-01-30-131953.png 1181w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"3-pulling-a-docker-image\">3. Pulling a Docker Image<\/h4>\n\n\n<p>Before you can run a container, you need the relevant Docker image. To download an image, use the <code>docker pull<\/code> command.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# <span style=\"background-color: initial;color: var(--ast-global-color-3)\">docker pull ubuntu<\/span><\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"984\" height=\"178\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-5.png\" alt=\"docker pull\" class=\"wp-image-2580\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-5.png 984w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-5-300x54.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-5-768x139.png 768w\" sizes=\"(max-width: 984px) 100vw, 984px\" \/><\/a><\/figure>\n\n\n\n<p>This command pulls the latest Ubuntu image from Docker Hub.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"4-listing-docker-containers\">4. Listing Docker Containers<\/h4>\n\n\n<p>To see a list of running containers, use:<\/p>\n\n\n\n<p>docker ps <\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"854\" height=\"77\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-6.png\" alt=\"list containers\" class=\"wp-image-2581\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-6.png 854w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-6-300x27.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-6-768x69.png 768w\" sizes=\"(max-width: 854px) 100vw, 854px\" \/><\/a><\/figure>\n\n\n\n<p>To see all containers, including stopped ones, use:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# docker ps -a<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"75\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-7-1024x75.png\" alt=\"list stopped containers\" class=\"wp-image-2582\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-7-1024x75.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-7-300x22.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-7-768x56.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-7.png 1327w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n<h4 class=\"wp-block-heading\" id=\"5-managing-containers\">5. Managing Containers<\/h4>\n\n\n<p>You can start, stop, restart, and remove containers using the <code>docker start<\/code>, <code>docker stop<\/code>, <code>docker restart<\/code>, and <code>docker rm<\/code> commands, respectively.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker stop &#91;CONTAINER_ID]<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"587\" height=\"122\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-8.png\" alt=\"\" class=\"wp-image-2583\" style=\"width:539px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-8.png 587w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-8-300x62.png 300w\" sizes=\"(max-width: 587px) 100vw, 587px\" \/><\/a><\/figure>\n\n\n\n<p>And to remove a stopped container:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker rm &#91;CONTAINER_ID]<\/code><\/pre>\n\n\n<h4 class=\"wp-block-heading\" id=\"6-managing-docker-images\">6. Managing Docker Images<\/h4>\n\n\n<p>Similarly, you can list, remove, and manage Docker images with commands like <code>docker images<\/code>, <code>docker rmi<\/code>, etc. To list all images:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# docker images<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-9.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"968\" height=\"121\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-9.png\" alt=\"list images \" class=\"wp-image-2584\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-9.png 968w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-9-300x38.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-9-768x96.png 768w\" sizes=\"(max-width: 968px) 100vw, 968px\" \/><\/a><\/figure>\n\n\n\n<p>To remove an image:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker rmi &#91;IMAGE_ID]<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-10.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"195\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/01\/image-10-1024x195.png\" alt=\"remove docker images\" class=\"wp-image-2585\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-10-1024x195.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-10-300x57.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-10-768x146.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/image-10.png 1076w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>In conclusion, installing Docker on Ubuntu allows you to take full advantage of containerization, enhancing the efficiency and scalability of application deployment and management. By following the steps outlined in this guide, you have successfully set up Docker on your Ubuntu system, positioning you to begin creating and managing Docker containers. Whether for development, testing, or production, Docker offers a powerful and flexible platform for running your applications in isolated environments, streamlining workflows and maximizing resource utilization. As you continue to explore Docker, you&#8217;ll discover an expansive ecosystem of tools and best practices that will further enhance your containerization journey.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-1af1a44b wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Expert Magento Support 24\/7<\/h3><p class=\"uagb-cta__desc\">Need help? Our Magento-savvy support team is available around the clock via chat, phone, and ticket to solve issues fast.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/magento-hosting\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Choose Your Plan<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Docker is an incredibly powerful tool that has reshaped how we think about developing, deploying, and running applications. By using Docker, developers can easily [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":2588,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[5,3,1],"tags":[],"class_list":["post-2568","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","category-installation","category-uncategorized"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1.png",2191,1212,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-150x150.png",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-300x166.png",300,166,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-768x425.png",768,425,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-1024x566.png",1024,566,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-1536x850.png",1536,850,true],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/01\/How-to-Install-And-Use-Docker-on-Ubuntu-1-2048x1133.png",2048,1133,true]},"uagb_author_info":{"display_name":"Nayana Nair","author_link":"https:\/\/www.veeble.com\/kb\/author\/nayana\/"},"uagb_comment_info":0,"uagb_excerpt":"Docker is an incredibly powerful tool that has reshaped how we think about developing, deploying, and running applications. By using Docker, developers can easily [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2568","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=2568"}],"version-history":[{"count":10,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2568\/revisions"}],"predecessor-version":[{"id":8586,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2568\/revisions\/8586"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/2588"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=2568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=2568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=2568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}