diff --git a/Dockerfile.centos8.0 b/Dockerfile.centos8.0 new file mode 100644 index 0000000..bca1834 --- /dev/null +++ b/Dockerfile.centos8.0 @@ -0,0 +1,16 @@ +FROM centos:centos8 + +RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* + +# Install necessary packages +RUN dnf install -y dnf-plugins-core \ + && dnf install -y epel-release \ + && dnf config-manager --set-enabled powertools \ + && dnf install -y gcc gcc-c++ make cmake git kernel-devel ca-certificates \ + && dnf install -y libstdc++-static which + +# Enable the new toolchain always in any followed docker run commands +COPY docker.centos8.0.entrypoint.sh /usr/local/bin/entrypoint.sh +ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] + +# vim: ft=dockerfile diff --git a/build.sh b/build.sh index af83447..f81b519 100755 --- a/build.sh +++ b/build.sh @@ -10,7 +10,7 @@ usage() { echo "" echo "Usage: $0 [OPTIONS] DISTRO" echo "" - echo "Available DISTROs are: ubuntu (resolved as ubuntu18.04), ubuntu18.04, ubuntu20.04, ubuntu22.04 or alpine." + echo "Available DISTROs are: ubuntu (resolved as ubuntu18.04), ubuntu18.04, ubuntu20.04, ubuntu22.04, alpine, centos or centos8.0" echo "" echo "OPTIONS" echo " -h, --help Show this help message and exit." @@ -45,6 +45,7 @@ case $distro in distro_ver="ubuntu18.04" ;; centos) distro_ver="${distro}7.6" ;; + centos8.0) distro_ver="${distro}" ;; alpine) distro_ver="${distro}3.8" ;; *) echo "Unknown distro value: ${distro}" diff --git a/docker.centos8.0.entrypoint.sh b/docker.centos8.0.entrypoint.sh new file mode 100755 index 0000000..3dd88ce --- /dev/null +++ b/docker.centos8.0.entrypoint.sh @@ -0,0 +1,4 @@ +#! /bin/bash +export CC=$(which gcc) +export CXX=$(which g++) +exec "$@" diff --git a/test.sh b/test.sh index e734cd4..62772cd 100755 --- a/test.sh +++ b/test.sh @@ -6,6 +6,7 @@ arch="x86_64" case $distro in ubuntu) distro_ver="${distro}16.04" ;; centos) distro_ver="${distro}7.6" ;; + centos8.0) distro_ver="${distro}" ;; alpine) distro_ver="${distro}3.8" ;; *) echo "Unknown distro value: ${distro}"