

{"id":111282,"date":"2023-01-19T10:00:42","date_gmt":"2023-01-19T04:30:42","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=111282"},"modified":"2023-01-19T10:42:23","modified_gmt":"2023-01-19T05:12:23","slug":"install-docker-on-ubuntu","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/","title":{"rendered":"How to Install Docker on Ubuntu?"},"content":{"rendered":"<p>In this article, we will primarily be focusing on the process of installing Docker, yet we will touch on a few topics like what docker is, docker commands, and a few more interesting topics. If you are really interested in learning and exploring Docker to its limits, you can read my other article on using Docker in Ubuntu.<\/p>\n<h3>What is Docker?<\/h3>\n<p>Let us start with the obvious question: what is Docker? Docker is a platform for building running and shipping applications in an inconsistent manner. If your application works on your development machine, it can run and function the same way on other machines.<\/p>\n<p>For someone who has been developing software, they might have probably come across a situation where their application works on the machine theory developed but doesn\u2019t work elsewhere. Why does this happen? Here are 3 reasons why it happens:<\/p>\n<p>1. One or more files are missing<br \/>\n2. Mismatch of software version<br \/>\n3. Different configuration settings.<\/p>\n<p>This is exactly where Docker comes to the rescue. With Docker, we can easily package up our application with everything it needs and run it anywhere on a machine with docker.<\/p>\n<p>For example, if your application requires a specific version of Node and MongoDB, all of these will be included in your application package. Now you can take this package and run it on any machine that runs docker. So if it works on your development machine, it is guaranteed to run on any other machine.<\/p>\n<p>Without Docker, as we work on different projects, our development machine gets cluttered with so many libraries and tools that are used by different applications. Then after a while, we don\u2019t know if we can remove one or more of these tools because we are afraid that we will mess up some applications.<\/p>\n<p>However, with Docker, we don\u2019t have to worry about this. Each application runs with its dependencies inside an isolated environment, we can safely remove an application with all its dependencies to clean up our machine.<\/p>\n<p>In a nutshell, Docker allows us to consistently build, run and ship our applications. IF you want to explore more features and for an in-depth overview of Docker, read my article on using Docker, for this article however, let us keep it to installing Docker in ubuntu<\/p>\n<h3>Why use docker?<\/h3>\n<p>The docker container virtualizes the operating system. Docker simply is lightweight and uses a fraction of the memory compared to booting an entire operating system.<\/p>\n<p><strong>1. Consistent environment<\/strong><\/p>\n<p>Docker gives developers the ability to create predictable environments which are isolated from other programs and applications. Docker includes software dependencies needed by the application.<\/p>\n<p><strong>2. Flexible<\/strong><\/p>\n<p>Docker is very flexible and can be run on any platform or operating systems like MAC, Windows, Linux, virtual machines, production machines, cloud, developer machines and so many more.<\/p>\n<h3>OS requirements to install docker on Ubuntu<\/h3>\n<p>Before installing docker you must first check if your system meets the following conditions. To install docker, you need the 64-bit version of any one of these Ubuntu versions:<\/p>\n<p>1. Ubuntu Jammy 22.04 (LTS)<br \/>\n2. Ubuntu Impish 21.10<br \/>\n3. Ubuntu Focal 20.04 (LTS)<br \/>\n4. Ubuntu Bionic 18.04 (LTS)<\/p>\n<h3>How to uninstall older versions of docker?<\/h3>\n<p>Before you install the new version of docker on your PC, you must make sure that you don\u2019t have any older versions of docker. If at all you do have any, uninstall them using the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt-get remove docker docker-engine docker.io containerd runc<\/pre>\n<p>When you execute the command, the contents of the \/var\/lib\/docker\/, like images, containers, volumes, and networks, are preserved.<\/p>\n<p>Now that we have everything set up, let us get to the matter at hand &#8211; installing docker.<\/p>\n<h3>Installing Docker on Ubuntu<\/h3>\n<p>The Docker installation package available in the official Ubuntu repository may not always be the latest and most up-to-date version. Therefore, let us install Docker from the official Docker repository, which always has the latest version.<\/p>\n<p>Before we install Docker, update your existing list of packages by using the command \u201csudo apt update\u201d<\/p>\n<p>#image#<\/p>\n<p>After successfully updating your packages, install a few prerequisite packages which let the \u201capt\u201d command use the packages over HTTPS. Use the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt install apt-transport-https ca-certificates curl software-properties-common<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/curl.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111523\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/curl.webp\" alt=\"curl\" width=\"1040\" height=\"494\" \/><\/a><\/p>\n<p>Add the GPG key for the official Docker repository to your system by using the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo apt-key add<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/fssl.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111517\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/fssl.webp\" alt=\"fssl\" width=\"911\" height=\"63\" \/><\/a><\/p>\n<p>Now that we are all set, let us add the Docker repository to APT sources by using the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo add-apt-repository \"deb [arch=amd64] https:\/\/download.docker.com\/linux\/ubuntu bionic stable\"<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/add-docker-repository.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111514\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/add-docker-repository.webp\" alt=\"add docker repository\" width=\"1200\" height=\"365\" \/><\/a><\/p>\n<p>Once the installation was successful, update the package with the Docker packages from the newly added repository by using the command \u201csudo apt update\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/update-docker.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111527\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/update-docker.webp\" alt=\"update docker\" width=\"1096\" height=\"423\" \/><\/a><\/p>\n<p>Now use the command \u201capt-cache policy docker-ce\u201d to check the progress<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/cache.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111519\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/cache.webp\" alt=\"cache\" width=\"762\" height=\"166\" \/><\/a><\/p>\n<p>If you observe carefully, you will notice 2 things:<\/p>\n<p>1. docker-ce is not installed<\/p>\n<p>2. The candidate for installation is from the Docker repository for Ubuntu 18.04 (bionic).<\/p>\n<p>Now, for the moment we have all been waiting for &#8211; installing Docker! To do so, use the command \u201csudo apt install docker-ce\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/install-docker.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111516\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/install-docker.webp\" alt=\"install docker\" width=\"1091\" height=\"525\" \/><\/a><\/p>\n<p>Docker is now installed, the daemon has started running and the process is enabled to start on boot you can check is it running or not by using the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo systemctl status docker<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/systemctl.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111521\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/systemctl.webp\" alt=\"systemctl\" width=\"973\" height=\"236\" \/><\/a><\/p>\n<p>If you get the output shown above you are good to go!<\/p>\n<p>Voila! We have just installed Docker! Before we call it a day, let us look at a few more installation methods of docker.<\/p>\n<h3>Installing Docker using the repository<\/h3>\n<p>Here is another method you can try to install docker on your system, but first, you need to set up the Docker repository, and only after that can you install and update Docker from the repository. So let us look at this procedure step by step.<\/p>\n<h4>1. Setting up the repository<\/h4>\n<p>Before we set up the repository, update your system to finish any pending installs of previous packages using the command \u201csudo apt-get update\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/setting-repository.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111515\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/setting-repository.webp\" alt=\"setting repository\" width=\"951\" height=\"529\" \/><\/a><\/p>\n<p>After successfully updating, install the packages to allow apt to use a repository over HTTPS by using the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo apt-get install \\\r\nca-certificates \\\r\ncurl \\\r\ngnupg \\\r\nlsb-release<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/install-packages.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111520\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/install-packages.webp\" alt=\"install packages\" width=\"1780\" height=\"920\" \/><\/a><\/p>\n<p>Add the docker official GPG key by using the set of command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">sudo mkdir -p \/etc\/apt\/keyrings\r\n$ curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/etc\/apt\/keyrings\/docker.gpg<\/pre>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/keyrings.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111525\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/keyrings.webp\" alt=\"keyrings\" width=\"1780\" height=\"236\" \/><\/a><\/p>\n<p>Setup the repository of docker by using the command shown below:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">echo \\\r\n\"deb [arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.gpg] https:\/\/download.docker.com\/linux\/ubuntu \\\r\n$(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null<\/pre>\n<h4>2. Installing the Docker engine<\/h4>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/docker-engine.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111518\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/docker-engine.webp\" alt=\"docker engine\" width=\"1780\" height=\"920\" \/><\/a><\/p>\n<h3><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/madison.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111524\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/madison.webp\" alt=\"madison\" width=\"1780\" height=\"920\" \/><\/a><\/h3>\n<h3><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/get-docker.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111528\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/get-docker.webp\" alt=\"get docker\" width=\"1780\" height=\"236\" \/><\/a><\/h3>\n<h3><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/test-docker.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-111526\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/test-docker.webp\" alt=\"test docker\" width=\"1780\" height=\"920\" \/><\/a><\/h3>\n<h3>Lifecycle of a Docker container<\/h3>\n<p>Here is the journey of a Docker container creation to execution, no pun intended!<\/p>\n<ul>\n<li>In the beginning, the Docker container will be in the created state.<\/li>\n<li>Then, when we use the Docker run command, it goes into the running state.<\/li>\n<li>We use the Docker kill command to kill an existing container.<\/li>\n<li>We use the pause command to pause an already existing and running container.<\/li>\n<li>To put a Docker container to a running state, from a stopped state, we use the Docker run command.<\/li>\n<\/ul>\n<h3>Docker container commands<\/h3>\n<p><strong>1. Docker run command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker run -i -t ubuntu \/bin\/bash<\/pre>\n<p>The above command runs a docker command<\/p>\n<p><strong>2. Docker top command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker top &lt;containerID&gt;<\/pre>\n<p>The above command shows you the top processes within a container.<\/p>\n<p><strong>3. Docker stop command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker stop &lt;containerID&gt;<\/pre>\n<p>The above command stops an already-running Docker container<\/p>\n<p><strong>4. Docker remove command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker rm &lt;containerID&gt;<\/pre>\n<p>The above command deletes an existing container.<\/p>\n<p><strong>5. Docker statistics command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker stats &lt;containerID&gt;<\/pre>\n<p>The above command shows the statistics of a running Docker container.<\/p>\n<p><strong>6. Docker attach command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker attach &lt;containerID&gt;<\/pre>\n<p>The above command attaches a running Docker container<\/p>\n<p><strong>7. Docker pause command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker pause &lt;containerID&gt;<\/pre>\n<p>The above command pauses the process of a running container<\/p>\n<p><strong>8. Docker unpause command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker unpause &lt;containerID&gt;<\/pre>\n<p>The above command unpauses the processes in a running container.<\/p>\n<p><strong>9. Docker kill command<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">docker kill &lt;containerID&gt;<\/pre>\n<p>This command kills the processes in a running Docker container.<\/p>\n<h3>Summary<\/h3>\n<p>You have now learned what docker is, why we use it, how to install it, the life cycle of a docker container, and a few docker commands.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In this article, we will primarily be focusing on the process of installing Docker, yet we will touch on a few topics like what docker is, docker commands, and a few more interesting topics.&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":111511,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[35],"tags":[16964,26876],"class_list":["post-111282","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-linux","tag-docker-container","tag-install-docker-on-ubuntu"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How to Install Docker on Ubuntu? - DataFlair<\/title>\n<meta name=\"description\" content=\"Learn what is docker, why we use it, how to install docker on ubuntu, the life cycle of a docker container, and some docker commands.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Install Docker on Ubuntu? - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Learn what is docker, why we use it, how to install docker on ubuntu, the life cycle of a docker container, and some docker commands.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2023-01-19T04:30:42+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-01-19T05:12:23+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/installing-docker-in-ubuntu.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Docker on Ubuntu? - DataFlair","description":"Learn what is docker, why we use it, how to install docker on ubuntu, the life cycle of a docker container, and some docker commands.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/","og_locale":"en_US","og_type":"article","og_title":"How to Install Docker on Ubuntu? - DataFlair","og_description":"Learn what is docker, why we use it, how to install docker on ubuntu, the life cycle of a docker container, and some docker commands.","og_url":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-01-19T04:30:42+00:00","article_modified_time":"2023-01-19T05:12:23+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/installing-docker-in-ubuntu.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"How to Install Docker on Ubuntu?","datePublished":"2023-01-19T04:30:42+00:00","dateModified":"2023-01-19T05:12:23+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/"},"wordCount":1228,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/installing-docker-in-ubuntu.webp","keywords":["docker container","install docker on ubuntu"],"articleSection":["Linux Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/","url":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/","name":"How to Install Docker on Ubuntu? - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/installing-docker-in-ubuntu.webp","datePublished":"2023-01-19T04:30:42+00:00","dateModified":"2023-01-19T05:12:23+00:00","description":"Learn what is docker, why we use it, how to install docker on ubuntu, the life cycle of a docker container, and some docker commands.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/installing-docker-in-ubuntu.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/01\/installing-docker-in-ubuntu.webp","width":1200,"height":628,"caption":"installing docker in ubuntu"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/install-docker-on-ubuntu\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Linux Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/linux\/"},{"@type":"ListItem","position":3,"name":"How to Install Docker on Ubuntu?"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111282","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=111282"}],"version-history":[{"count":4,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111282\/revisions"}],"predecessor-version":[{"id":111529,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/111282\/revisions\/111529"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/111511"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=111282"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=111282"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=111282"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}