Skip to content

Commit a71f782

Browse files
author
Jeff Frontz
committed
Update to use distro-specific package-management tools.
1 parent ec6ebe9 commit a71f782

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

Diff for: bin/make-base-vm

+9-1
Original file line numberDiff line numberDiff line change
@@ -184,12 +184,20 @@ if [ $DOCKER = "1" ]; then
184184
base_image="$DISTRO:$SUITE"
185185
fi
186186

187+
if [ $DISTRO = "centos" ]; then
188+
UPDATE_FROM_REPO="yum -y update && yum -y install epel-release"
189+
INSTALL_FROM_REPO="yum -y install"
190+
else
191+
UPDATE_FROM_REPO="apt-get update"
192+
INSTALL_FROM_REPO="apt-get --no-install-recommends -y install"
193+
fi
194+
187195
# Generate the dockerfile
188196
cat << EOF > $OUT.Dockerfile
189197
FROM $base_image
190198
191199
ENV DEBIAN_FRONTEND=noninteractive
192-
RUN apt-get update && apt-get --no-install-recommends -y install $addpkg
200+
RUN $UPDATE_FROM_REPO && $INSTALL_FROM_REPO $addpkg
193201
194202
RUN useradd -ms /bin/bash -U $DISTRO
195203
USER $DISTRO:$DISTRO

0 commit comments

Comments
 (0)