{"id":260,"date":"2025-11-22T12:59:01","date_gmt":"2025-11-22T12:59:01","guid":{"rendered":"https:\/\/haco.club\/?p=260"},"modified":"2025-11-22T12:59:01","modified_gmt":"2025-11-22T12:59:01","slug":"setup-docker-on-ubuntu-25-10","status":"publish","type":"post","link":"https:\/\/haco.zone\/?p=260","title":{"rendered":"Setup Docker on Ubuntu 25.10"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">To set up Docker on\u00a0<strong>Ubuntu 25.10 (Questing Quokka)<\/strong>, follow these steps. These instructions use the official Docker repository to ensure you get the latest version.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Uninstall Old Versions<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Conflicting packages (like&nbsp;docker.io&nbsp;or&nbsp;podman-docker) might be installed by default. Remove them to prevent conflicts:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get remove docker.io docker-doc docker-compose docker-compose-v2 podman-docker containerd runc<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Set Up the Docker Repository<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001<strong>Update your package index<\/strong>\u00a0and install necessary dependencies:<\/p>\n\n\n\n<ol class=\"wp-block-list\"><\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update\nsudo apt-get install ca-certificates curl<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001<strong>Add Docker\u2019s official GPG key<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo install -m 0755 -d \/etc\/apt\/keyrings\nsudo curl -fsSL https:\/\/download.docker.com\/linux\/ubuntu\/gpg -o \/etc\/apt\/keyrings\/docker.asc\nsudo chmod a+r \/etc\/apt\/keyrings\/docker.asc<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001<strong>Add the repository to your sources<\/strong>:<br>This command automatically detects your Ubuntu version codename (questing\u00a0for 25.10) and adds the correct repository.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>echo \\\n  \"deb &#91;arch=$(dpkg --print-architecture) signed-by=\/etc\/apt\/keyrings\/docker.asc] https:\/\/download.docker.com\/linux\/ubuntu \\\n  $(. \/etc\/os-release &amp;&amp; echo \"$VERSION_CODENAME\") stable\" | \\\n  sudo tee \/etc\/apt\/sources.list.d\/docker.list > \/dev\/null<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001<strong>Update the package index again<\/strong>\u00a0to include the new Docker packages:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get update<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Install Docker Engine<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Install the latest version of Docker Engine, containerd, and Docker Compose:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Verify the Installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Run the &#8220;hello-world&#8221; image to verify that Docker is installed and running correctly:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo docker run hello-world<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: Run Docker Without Sudo (Optional)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">By default, running Docker requires&nbsp;sudo. To run Docker commands as your current user:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001<strong>Create the docker group<\/strong>\u00a0(it likely already exists):<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo groupadd docker<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001<strong>Add your user to the group<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sudo usermod -aG docker $USER<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">3\u3001<strong>Apply the changes<\/strong>:<br>Log out and log back in, or run the following command to activate the changes immediately:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>newgrp docker<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">4\u3001<strong>Test it<\/strong>:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run hello-world<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><em>(This should now work without\u00a0sudo)<\/em>.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Run a never-exit docker container of ubuntu20.04<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">The &#8220;Tail Null&#8221; (Classic)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">This is a very common alternative often used in older scripts. It &#8220;watches&#8221; a file that never changes, keeping the process active.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker run -d --name my-ubuntu ubuntu:20.04 tail -f \/dev\/null<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">How to enter the container<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Once your container is running in the background, you can log into it using\u00a0exec:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker exec -it my-ubuntu bash<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To set up Docker on\u00a0Ubuntu 25.10 (Questing Quokka), follow these [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[15,23],"class_list":["post-260","post","type-post","status-publish","format-standard","hentry","category-tutotial","tag-docker","tag-ubuntu"],"_links":{"self":[{"href":"https:\/\/haco.zone\/index.php?rest_route=\/wp\/v2\/posts\/260","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/haco.zone\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/haco.zone\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/haco.zone\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/haco.zone\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=260"}],"version-history":[{"count":1,"href":"https:\/\/haco.zone\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions"}],"predecessor-version":[{"id":261,"href":"https:\/\/haco.zone\/index.php?rest_route=\/wp\/v2\/posts\/260\/revisions\/261"}],"wp:attachment":[{"href":"https:\/\/haco.zone\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=260"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/haco.zone\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=260"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/haco.zone\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=260"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}