1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

M #: Differenciate between c7 & c8 on DH images (#1050)

This commit is contained in:
Christian González 2021-03-31 18:01:37 +02:00 committed by GitHub
parent 60f1bf2eb0
commit 3d83d580f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 3 deletions

View File

@ -154,9 +154,12 @@ fi
# Check distro
if [ -z "$distro" ]; then
distro=$(docker run --rm --entrypoint cat \
os_info=$(docker run --rm --entrypoint cat \
-e "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" \
"$docker_hub" /etc/os-release | grep "^ID=.*\n" | cut -d= -f 2 | xargs)
"$docker_hub" /etc/os-release)
distro=$(echo "$os_info" | grep "^ID=.*\n" | cut -d= -f 2 | xargs)
version=$(echo "$os_info" | grep "VERSION_ID=" | cut -d= -f 2 | xargs)
fi
if [ -z "$distro" ]; then
@ -173,7 +176,11 @@ debian|ubuntu)
commands=$(cat "$DOCKERFILES/debian")
;;
centos)
commands=$(cat "$DOCKERFILES/centos")
if [ "$version" = "8" ]; then
commands=$(cat "$DOCKERFILES/centos8")
else
commands=$(cat "$DOCKERFILES/centos7")
fi
;;
alpine)
commands=$(cat "$DOCKERFILES/alpine")

View File

@ -0,0 +1,7 @@
RUN yum update -y
RUN yum install -y epel-release
RUN yum install -y initscripts \
e2fsprogs \
haveged
RUN yum localinstall -y `find /root/context -type f \( ! -iname "*ec2*" -iname "*el8.noarch.rpm" \)`
RUN systemctl enable haveged