1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

update dockerfile to use dnf because i hate the warning

Signed-off-by: Jessica Frazelle <acidburn@docker.com>
This commit is contained in:
Jessica Frazelle 2015-10-27 10:25:39 -07:00
parent b6fa541877
commit b8891a32d1
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
2 changed files with 8 additions and 4 deletions

View file

@ -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

View file

@ -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