{"id":950,"date":"2019-09-24T17:02:16","date_gmt":"2019-09-24T05:02:16","guid":{"rendered":"http:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=950"},"modified":"2019-09-24T17:02:16","modified_gmt":"2019-09-24T05:02:16","slug":"docker-and-issues-with-using-minimal-fedora-base-images","status":"publish","type":"post","link":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=950","title":{"rendered":"Docker and issues with using minimal Fedora base images"},"content":{"rendered":"<p>\nIt is recomended when creating docker images that minimal images be used. In the case of Fedora it is recomended that for smallest images the minimal image should be used and &#8220;microdnf&#8221; be used instead of the full blown &#8220;dnf&#8221; package manager.\n<\/p>\n<p>\nOne major issue I have hit with using microdnf is that if a package in the main Fedora repositories is downgraded to a version below that shipped with the minimal image &#8220;microdnf&#8221; cannot handle downgrading packages when required.\n<\/p>\n<p>\nRe-doing a build that had been working for over four months it suddenly started failing with a conflict. The error I hit is below.\n<\/p>\n<pre>\r\n.....\r\nUpgrading:\r\n glibc-2.29-22.fc30.x86_64                             updates      4.2\\xc2\\xa0MB\r\n glibc-common-2.29-22.fc30.x86_64                      updates    858.5\\xc2\\xa0kB\r\n glibc-minimal-langpack-2.29-22.fc30.x86_64            updates     48.4\\xc2\\xa0kB\r\n libxcrypt-4.4.10-1.fc30.x86_64                        updates    125.3\\xc2\\xa0kB\r\nDowngrading:\r\n libstdc++-9.0.1-0.10.fc30.x86_64                      fedora     583.9\\xc2\\xa0kB\r\nTransaction Summary:\r\n Installing:      204 packages\r\n Reinstalling:      0 packages\r\n Upgrading:         4 packages\r\n Removing:          0 packages\r\n Downgrading:       1 packages\r\nDownloading packages...\r\nRunning transaction test...\r\nerror: Error running transaction: package libstdc++-9.1.1-1.fc30.x86_64 (which is newer than libstdc++-9.0.1-0.10.fc30.x86_64) is already installed\r\n<\/pre>\n<p>\nThe &#8220;microdnf&#8221; tool does not support usefull options &#8220;dnf&#8221; supports for resolving conflicts, in the case of conflicts like this the only solution is to switch to using the full &#8220;dnf&#8221; package. It requires changing the Dockerfile from&#8230;\n<\/p>\n<pre>\r\nFROM registry.fedoraproject.org\/fedora-minimal:30\r\n...lots of stuff...\r\nRUN microdnf -y install perl procps-ng vim-minimal && microdnf clean all\r\n<\/pre>\n<p>\nto the below&#8230;\n<\/p>\n<pre>\r\nFROM registry.fedoraproject.org\/fedora-minimal:30\r\n...lots of stuff...\r\nRUN microdnf -y install dnf\r\nRUN dnf -y --allowerasing --obsoletes install perl procps-ng vim-minimal && dnf clean all && microdnf clean all\r\n<\/pre>\n<p>\nThis results in a image size around 42Mb larger than just using microdnf, but it is unfortunately the only way to handle the issue.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is recomended when creating docker images that minimal images be used. In the case of Fedora it is recomended that for smallest images the minimal image should be used and &#8220;microdnf&#8221; be used instead of the full blown &#8220;dnf&#8221; &hellip; <a href=\"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/?p=950\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,5],"tags":[],"class_list":["post-950","post","type-post","status-publish","format-standard","hentry","category-automation","category-my-nux-thoughts-and-notes"],"_links":{"self":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/950","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=950"}],"version-history":[{"count":1,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/950\/revisions"}],"predecessor-version":[{"id":951,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/950\/revisions\/951"}],"wp:attachment":[{"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=950"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=950"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mdickinson.dyndns.org\/php\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=950"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}