Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions Dockerfile.centos8.0
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down Expand Up @@ -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}"
Expand Down
4 changes: 4 additions & 0 deletions docker.centos8.0.entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#! /bin/bash
export CC=$(which gcc)
export CXX=$(which g++)
exec "$@"
1 change: 1 addition & 0 deletions test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down