Skip to content

Commit

Permalink
Change generate.sh so that the yum command for packages remains gener…
Browse files Browse the repository at this point in the history
…ic across distros.

Signed-off-by: Avi Miller <avi.miller@oracle.com>
  • Loading branch information
Djelibeybi committed Jul 9, 2015
1 parent 0117330 commit f18c4f2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
15 changes: 9 additions & 6 deletions contrib/builder/rpm/generate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,16 @@ for version in "${versions[@]}"; do
glibc-static
libselinux-devel # for "libselinux.so"
sqlite-devel # for "sqlite3.h"
tar # older versions of dev-tools don't have tar
tar # older versions of dev-tools do not have tar
)
if [ "$from" == "oraclelinux:7" ]; then
echo "RUN yum install --enablerepo=ol7_optional_latest -y ${packages[*]}" >> "$version/Dockerfile"
else
echo "RUN yum install -y ${packages[*]}" >> "$version/Dockerfile"
fi

case "$from" in
oraclelinux:7)
# Enable the optional repository
packages=( --enablerepo=ol7_optional_latest "${packages[*]}" )
;;
esac
echo "RUN yum install -y ${packages[*]}" >> "$version/Dockerfile"

echo >> "$version/Dockerfile"

Expand Down
2 changes: 1 addition & 1 deletion contrib/builder/rpm/oraclelinux-7/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
FROM oraclelinux:7

RUN yum groupinstall -y "Development Tools"
RUN yum install --enablerepo=ol7_optional_latest -y btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar
RUN yum install -y --enablerepo=ol7_optional_latest btrfs-progs-devel device-mapper-devel glibc-static libselinux-devel sqlite-devel tar

ENV GO_VERSION 1.4.2
RUN curl -fSL "https://storage.googleapis.com/golang/go${GO_VERSION}.linux-amd64.tar.gz" | tar xzC /usr/local
Expand Down

0 comments on commit f18c4f2

Please sign in to comment.