{"id":5972,"date":"2025-04-09T11:12:46","date_gmt":"2025-04-09T16:12:46","guid":{"rendered":"https:\/\/www.incredigeek.com\/home\/?p=5972"},"modified":"2025-04-09T11:12:58","modified_gmt":"2025-04-09T16:12:58","slug":"how-to-lock-docker-version-on-rhel-rockylinux-almalinux","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/how-to-lock-docker-version-on-rhel-rockylinux-almalinux\/","title":{"rendered":"How to &#8220;Lock&#8221; docker version on RHEL \/ RockyLinux \/ AlmaLinux"},"content":{"rendered":"\n<p>Sometimes it can be helpful to have a specific docker version that doesn&#8217;t change with a <code>dnf update<\/code>.  To manually set the docker version, do the following.<\/p>\n\n\n\n<p>Install dnf versionlock<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dnf install 'dnf-command(versionlock)'<\/pre>\n\n\n\n<p>Next, lock the version for Docker and the Docker CLI.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dnf versionlock add docker-ce-3:27.5.0 docker-ce-cli-1:27.5.0<\/pre>\n\n\n\n<p>If you need to downgrade docker, you can do that with the following.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dnf downgrade docker-ce-3:27.5.0 docker-ce-cli-1:27.5.0<\/pre>\n\n\n\n<p>That should be it.  If you want to check and see what packages are locked, run<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">dnf versionlock list<\/pre>\n\n\n\n<p>Example output:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">Last metadata expiration check: 0:01:39 ago on Tue 08 Apr 2025 01:01:10 AM UTC.<br>docker-ce-3:27.5.0-1.el9.*<br>docker-ce-cli-1:27.5.0-1.el9.*<\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes it can be helpful to have a specific docker version that doesn&#8217;t change with a dnf update. To manually set the docker version, do the following. Install dnf versionlock dnf install &#8216;dnf-command(versionlock)&#8217; Next, lock the version for Docker and &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/how-to-lock-docker-version-on-rhel-rockylinux-almalinux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[491,246,1727,1726,441],"class_list":["post-5972","post","type-post","status-publish","format-standard","hentry","category-linux","tag-dnf","tag-docker","tag-package-management","tag-versionlock","tag-yum"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5972","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=5972"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5972\/revisions"}],"predecessor-version":[{"id":5974,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/5972\/revisions\/5974"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=5972"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=5972"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=5972"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}