From 4bd15e92c8cfc4d409bb183bbc2a43fcdc54603f Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 21 Oct 2021 01:42:13 +0200 Subject: [PATCH] dockerfile: switch to fedora-minimal * source the image from fedoraproject's container repository * edit Dockerfile to use microdnf as dnf is unavailable in -minimal images * instruct microdnf to not install weak deps or docs * update image info in README.md --- Dockerfile | 10 +++++----- README.md | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index e333bc1..2c10234 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.3 -FROM registry.fedoraproject.org/fedora:34 +FROM registry.fedoraproject.org/fedora-minimal:34 ARG BUILD_DATE ARG VCS_REF @@ -12,9 +12,9 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.license=GPL-3.0 RUN printf "[main]\ngpg_check=1\ninstallonly_limit=2\nclean_requirements_on_remove=True\nfastestmirror=True\nmax_parallel_downloads=7\n" > /etc/dnf/dnf.conf; \ - cat /etc/dnf/dnf.conf; \ - dnf --refresh upgrade -y -RUN dnf install --nodocs -y \ + cat /etc/dnf/dnf.conf; \ + microdnf --refresh upgrade -y +RUN microdnf install --nodocs --setopt install_weak_deps=0 -y \ git \ ninja-build \ make \ @@ -47,7 +47,7 @@ RUN dnf install --nodocs -y \ kernel-devel \ ncurses-{c++-libs,devel,libs,static} \ numactl-{devel,libs} \ - && dnf clean all -y + && microdnf clean all -y # nDPI will by default (left unchanged) be installed with prefix "/usr/local". # this makes sure the results get picked up in subsequent linkings against it. diff --git a/README.md b/README.md index 20b8dcd..e9a4bfa 100644 --- a/README.md +++ b/README.md @@ -13,11 +13,12 @@ The image is rebuilt nightly to ensure it always has the latest packages. development happens on [this Gitea instance](https://git.dotya.ml/wanderer/docker-fedora-cpp) ## What you get -* updated `registry.fedoraproject.org/fedora:34` image +* updated `registry.fedoraproject.org/fedora-minimal:34` image * the result of ```sh dnf install -y \ git \ + ninja-build \ make \ {c,auto}make \ gcc \