From b8891a32d13724bb992d9e8aca4777a32334371e Mon Sep 17 00:00:00 2001 From: Jessica Frazelle Date: Tue, 27 Oct 2015 10:25:39 -0700 Subject: [PATCH] update dockerfile to use dnf because i hate the warning Signed-off-by: Jessica Frazelle --- contrib/builder/rpm/fedora-22/Dockerfile | 4 ++-- contrib/builder/rpm/generate.sh | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/contrib/builder/rpm/fedora-22/Dockerfile b/contrib/builder/rpm/fedora-22/Dockerfile index e6dd2014ca..1463c252a9 100644 --- a/contrib/builder/rpm/fedora-22/Dockerfile +++ b/contrib/builder/rpm/fedora-22/Dockerfile @@ -4,8 +4,8 @@ FROM fedora:22 -RUN yum install -y @development-tools fedora-packager -RUN yum install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel selinux-policy selinux-policy-devel sqlite-devel tar +RUN dnf install -y @development-tools fedora-packager +RUN dnf install -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel selinux-policy selinux-policy-devel sqlite-devel tar ENV GO_VERSION 1.4.3 RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local diff --git a/contrib/builder/rpm/generate.sh b/contrib/builder/rpm/generate.sh index 44fd3a98a8..c246c084be 100755 --- a/contrib/builder/rpm/generate.sh +++ b/contrib/builder/rpm/generate.sh @@ -21,6 +21,10 @@ for version in "${versions[@]}"; do distro="${version%-*}" suite="${version##*-}" from="${distro}:${suite}" + installer=yum + if [[ "$distro" == "fedora" ]] && [[ "$suite" -ge "22" ]]; then + installer=dnf + fi mkdir -p "$version" echo "$version -> FROM $from" @@ -52,7 +56,7 @@ for version in "${versions[@]}"; do echo 'RUN zypper --non-interactive install ca-certificates* curl gzip rpm-build' >> "$version/Dockerfile" ;; *) - echo 'RUN yum install -y @development-tools fedora-packager' >> "$version/Dockerfile" + echo "RUN ${installer} install -y @development-tools fedora-packager" >> "$version/Dockerfile" ;; esac @@ -82,7 +86,7 @@ for version in "${versions[@]}"; do echo "RUN zypper --non-interactive install ${packages[*]}" >> "$version/Dockerfile" ;; *) - echo "RUN yum install -y ${packages[*]}" >> "$version/Dockerfile" + echo "RUN ${installer} install -y ${packages[*]}" >> "$version/Dockerfile" ;; esac