{"id":8763,"date":"2025-05-14T17:22:55","date_gmt":"2025-05-14T11:52:55","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=8763"},"modified":"2025-05-14T17:22:59","modified_gmt":"2025-05-14T11:52:59","slug":"simple-steps-to-install-docker-on-ubuntu","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/simple-steps-to-install-docker-on-ubuntu\/","title":{"rendered":"Simple Steps to Install Docker on Ubuntu"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Introduction:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Docker is a powerful tool that lets you package and run applications in lightweight, portable containers.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Instead of installing software directly on your system, Docker lets you run everything in isolated environments\u2014so it\u2019s cleaner, faster, and works the same on any machine. Whether you&#8217;re building apps, testing code, or deploying to production, Docker simplifies the process and saves you tons of setup time.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">PREREQUISITES<strong>:<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you&#8217;re using a firewall tool like <strong>UFW<\/strong> or <strong>firewalld<\/strong>, keep in mind that <strong>Docker can bypass your firewall rules when exposing container ports<\/strong>.<\/li>\n\n\n\n<li>Also, <strong>Docker only works with iptables<\/strong>, not <strong>nftables<\/strong>. So, make sure your firewall rules are created using <code>iptables<\/code> or <code>ip6tables<\/code>, and add them to the <code>DOCKER-USER<\/code> chain to control traffic properly.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Ubuntu Versions for Docker Engine:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To install Docker Engine, you\u2019ll need a <strong>64-bit version<\/strong> of one of the following <strong>Ubuntu releases<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ubuntu 24.10 (Oracular)<\/li>\n\n\n\n<li>Ubuntu 24.04 LTS (Noble)<\/li>\n\n\n\n<li>Ubuntu 22.04 LTS (Jammy)<\/li>\n\n\n\n<li>Ubuntu 20.04 LTS (Focal)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Docker supports multiple system architectures, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>x86_64 \/ amd64 (most common)<\/li>\n\n\n\n<li>arm64<\/li>\n\n\n\n<li>armhf<\/li>\n\n\n\n<li>s390x<\/li>\n\n\n\n<li>ppc64le (ppc64el)<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure your system matches one of these versions and architectures before proceeding with the installation.<\/p>\n\n\n\n<div class=\"wp-block-group is-nowrap is-layout-flex wp-container-core-group-is-layout-7387b849 wp-block-group-is-layout-flex\">\n<h3 class=\"wp-block-heading\">Installation Method For Docker:<\/h3>\n<\/div>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Update Your System<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Ensure your system packages are up to date before installing Docker.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\nsudo apt upgrade -y<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Install Required Dependencies<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install tools needed to work with external repositories over HTTPS.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install apt-transport-https ca-certificates curl software-properties-common -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Add Docker\u2019s Official GPG Key<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add Docker\u2019s secure key to verify packages from their repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg | sudo gpg --dearmor -o \/usr\/share\/keyrings\/docker-archive-keyring.gpg\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Set Up Docker Repository<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Add the Docker repository to your system\u2019s software sources.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \"deb &#091;arch=$(dpkg --print-architecture) signed-by=\/usr\/share\/keyrings\/docker-archive-keyring.gpg] https:\/\/download.docker.com\/linux\/ubuntu $(lsb_release -cs) stable\" | sudo tee \/etc\/apt\/sources.list.d\/docker.list &gt; \/dev\/null\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Refresh Your Package List<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Update your system again to include Docker\u2019s packages.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt update\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Install Docker Engine<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install the Docker runtime and command-line tools.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt install docker-ce docker-ce-cli containerd.io -y\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Check Docker Version<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Verify that Docker was installed successfully.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker --version\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Run a Test Container<\/strong><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Make sure Docker is working by running the Hello World image.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run hello-world\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion:<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Starting with Docker might feel like learning a new language at first, but once you get the basics, it becomes an incredibly powerful tool in your development toolkit.<br>By mastering containers, you&#8217;re stepping into a world where applications are more portable, scalable, and reliable than ever before.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction: Docker is a powerful tool that lets you package and run applications in lightweight, portable containers. Instead of installing [&hellip;]<\/p>\n","protected":false},"author":519,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"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":"","ast-disable-related-posts":"","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":"default","ast-page-background-enabled":"default","ast-page-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":"","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-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":"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":""},"mobile":{"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":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1020],"tags":[],"class_list":["post-8763","post","type-post","status-publish","format-standard","hentry","category-containers-kubernetes","psol-cat-containers-kubernetes"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-2hl","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8763","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/519"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=8763"}],"version-history":[{"count":0,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/8763\/revisions"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=8763"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=8763"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=8763"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}