From 67415a1875bbd373a12513221a0da70c8b939865 Mon Sep 17 00:00:00 2001 From: Omar Padron Date: Sat, 16 Feb 2019 10:20:25 -0500 Subject: [Docker] more base images (#10560) * Revert "work around an issue with docker/dockerhub (#10547)" This reverts commit 0ef139ac4d475fb99e08b0856dd7f27b97082e50. * Add more docker base image configurations. - Renamed configs - "centos" -> "centos-7" - "fedora" -> "fedora-24" - "opensuse" -> "opensuse-tumbleweed" - "scilinux" -> "scilinux-7" - "ubuntu" -> "ubuntu-1804" - Added configs - "centos-6" - "fedora-29" - "opensuse-leap" - "scilinux-6" - "ubuntu-1604" With these changes, our docker hub image collection will consist of the following: - "spack/archlinux" - "latest" - "spack/centos" - "latest", "centos7", "7" - "centos6", "6" - "spack/fedora" - "latest", "29" - "24" - "spack/opensuse" - "latest", "tumbleweed" - "leap" - "spack/scilinux" - "latest", "7" - "6" - "spack/ubuntu" - "latest", "bionic", "18.04" - "xenial", "16.04" --- share/spack/docker/Dockerfile | 5 +++-- share/spack/docker/config/centos-6.bash | 16 ++++++++++++++++ share/spack/docker/config/centos-7.bash | 16 ++++++++++++++++ share/spack/docker/config/centos.bash | 16 ---------------- share/spack/docker/config/fedora-24.bash | 15 +++++++++++++++ share/spack/docker/config/fedora-29.bash | 16 ++++++++++++++++ share/spack/docker/config/fedora.bash | 16 ---------------- share/spack/docker/config/opensuse-leap.bash | 15 +++++++++++++++ share/spack/docker/config/opensuse-tumbleweed.bash | 16 ++++++++++++++++ share/spack/docker/config/opensuse.bash | 16 ---------------- share/spack/docker/config/scilinux-6.bash | 16 ++++++++++++++++ share/spack/docker/config/scilinux-7.bash | 17 +++++++++++++++++ share/spack/docker/config/scilinux.bash | 17 ----------------- share/spack/docker/config/ubuntu-1604.bash | 15 +++++++++++++++ share/spack/docker/config/ubuntu-1804.bash | 15 +++++++++++++++ share/spack/docker/config/ubuntu.bash | 15 --------------- share/spack/docker/handle-ssh.sh | 7 ++++++- share/spack/qa/run-docker-tests | 14 -------------- 18 files changed, 166 insertions(+), 97 deletions(-) create mode 100644 share/spack/docker/config/centos-6.bash create mode 100644 share/spack/docker/config/centos-7.bash delete mode 100644 share/spack/docker/config/centos.bash create mode 100644 share/spack/docker/config/fedora-24.bash create mode 100644 share/spack/docker/config/fedora-29.bash delete mode 100644 share/spack/docker/config/fedora.bash create mode 100644 share/spack/docker/config/opensuse-leap.bash create mode 100644 share/spack/docker/config/opensuse-tumbleweed.bash delete mode 100644 share/spack/docker/config/opensuse.bash create mode 100644 share/spack/docker/config/scilinux-6.bash create mode 100644 share/spack/docker/config/scilinux-7.bash delete mode 100644 share/spack/docker/config/scilinux.bash create mode 100644 share/spack/docker/config/ubuntu-1604.bash create mode 100644 share/spack/docker/config/ubuntu-1804.bash delete mode 100644 share/spack/docker/config/ubuntu.bash (limited to 'share') diff --git a/share/spack/docker/Dockerfile b/share/spack/docker/Dockerfile index 3f644db302..3417f9ab16 100644 --- a/share/spack/docker/Dockerfile +++ b/share/spack/docker/Dockerfile @@ -60,7 +60,8 @@ RUN yum update -y MASK PUSH MASK [[ $DISTRO =~ rhel.* ]] - RUN yum install -y yum-conf-repos.noarch \ + RUN ( yum install -y yum-conf-repos.noarch \ + || yum install -y yum-conf-epel.noarch yum-conf-elrepo.noarch ) \ && yum update -y MASK POP @@ -110,7 +111,7 @@ RUN apt-get -yqq update \ openssh-server python python-pip tcl MASK PUSH - MASK [[ $DISTRO_VERSION == bionic ]] + MASK [[ $DISTRO_VERSION == 18.04 ]] # [WORKAROUND] # https://bugs.launchpad.net/ubuntu/+source/lua-posix/+bug/1752082 RUN ln -s posix_c.so /usr/lib/x86_64-linux-gnu/lua/5.2/posix.so diff --git a/share/spack/docker/config/centos-6.bash b/share/spack/docker/config/centos-6.bash new file mode 100644 index 0000000000..fd80f07143 --- /dev/null +++ b/share/spack/docker/config/centos-6.bash @@ -0,0 +1,16 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset DISTRO_VERSION +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=centos +export BASE_TAG="6" +export EXTRA_TAGS="centos6" diff --git a/share/spack/docker/config/centos-7.bash b/share/spack/docker/config/centos-7.bash new file mode 100644 index 0000000000..dd5d10c9b9 --- /dev/null +++ b/share/spack/docker/config/centos-7.bash @@ -0,0 +1,16 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset DISTRO_VERSION +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=centos +export BASE_TAG="7" +export EXTRA_TAGS="centos7 latest" diff --git a/share/spack/docker/config/centos.bash b/share/spack/docker/config/centos.bash deleted file mode 100644 index aacffaa81d..0000000000 --- a/share/spack/docker/config/centos.bash +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -unset DISTRO -unset DISTRO_VERSION -unset BASE_IMAGE -unset BASE_NAME -unset BASE_TAG -unset TAG -unset EXTRA_TAGS - -export BASE_IMAGE=centos -export BASE_TAG="7" -export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/fedora-24.bash b/share/spack/docker/config/fedora-24.bash new file mode 100644 index 0000000000..d104056c76 --- /dev/null +++ b/share/spack/docker/config/fedora-24.bash @@ -0,0 +1,15 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset DISTRO_VERSION +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=fedora +export BASE_TAG="24" diff --git a/share/spack/docker/config/fedora-29.bash b/share/spack/docker/config/fedora-29.bash new file mode 100644 index 0000000000..8dd3a01796 --- /dev/null +++ b/share/spack/docker/config/fedora-29.bash @@ -0,0 +1,16 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset DISTRO_VERSION +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=fedora +export BASE_TAG="29" +export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/fedora.bash b/share/spack/docker/config/fedora.bash deleted file mode 100644 index 3364e2fd53..0000000000 --- a/share/spack/docker/config/fedora.bash +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -unset DISTRO -unset DISTRO_VERSION -unset BASE_IMAGE -unset BASE_NAME -unset BASE_TAG -unset TAG -unset EXTRA_TAGS - -export BASE_IMAGE=fedora -export BASE_TAG="24" -export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/opensuse-leap.bash b/share/spack/docker/config/opensuse-leap.bash new file mode 100644 index 0000000000..932d2f0d46 --- /dev/null +++ b/share/spack/docker/config/opensuse-leap.bash @@ -0,0 +1,15 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset DISTRO_VERSION +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=opensuse +export BASE_TAG="leap" diff --git a/share/spack/docker/config/opensuse-tumbleweed.bash b/share/spack/docker/config/opensuse-tumbleweed.bash new file mode 100644 index 0000000000..bb004cb2be --- /dev/null +++ b/share/spack/docker/config/opensuse-tumbleweed.bash @@ -0,0 +1,16 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset DISTRO_VERSION +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=opensuse +export BASE_TAG="tumbleweed" +export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/opensuse.bash b/share/spack/docker/config/opensuse.bash deleted file mode 100644 index bb004cb2be..0000000000 --- a/share/spack/docker/config/opensuse.bash +++ /dev/null @@ -1,16 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -unset DISTRO -unset DISTRO_VERSION -unset BASE_IMAGE -unset BASE_NAME -unset BASE_TAG -unset TAG -unset EXTRA_TAGS - -export BASE_IMAGE=opensuse -export BASE_TAG="tumbleweed" -export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/scilinux-6.bash b/share/spack/docker/config/scilinux-6.bash new file mode 100644 index 0000000000..aa705b65c1 --- /dev/null +++ b/share/spack/docker/config/scilinux-6.bash @@ -0,0 +1,16 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=sl +export BASE_TAG="6" +export BASE_NAME=scilinux +export DISTRO=rhel6 diff --git a/share/spack/docker/config/scilinux-7.bash b/share/spack/docker/config/scilinux-7.bash new file mode 100644 index 0000000000..290e0a0797 --- /dev/null +++ b/share/spack/docker/config/scilinux-7.bash @@ -0,0 +1,17 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=sl +export BASE_TAG="7" +export BASE_NAME=scilinux +export DISTRO=rhel7 +export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/scilinux.bash b/share/spack/docker/config/scilinux.bash deleted file mode 100644 index 290e0a0797..0000000000 --- a/share/spack/docker/config/scilinux.bash +++ /dev/null @@ -1,17 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -unset DISTRO -unset BASE_IMAGE -unset BASE_NAME -unset BASE_TAG -unset TAG -unset EXTRA_TAGS - -export BASE_IMAGE=sl -export BASE_TAG="7" -export BASE_NAME=scilinux -export DISTRO=rhel7 -export EXTRA_TAGS="latest" diff --git a/share/spack/docker/config/ubuntu-1604.bash b/share/spack/docker/config/ubuntu-1604.bash new file mode 100644 index 0000000000..bbcbd870e5 --- /dev/null +++ b/share/spack/docker/config/ubuntu-1604.bash @@ -0,0 +1,15 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=ubuntu +export BASE_TAG="16.04" +export EXTRA_TAGS="xenial" diff --git a/share/spack/docker/config/ubuntu-1804.bash b/share/spack/docker/config/ubuntu-1804.bash new file mode 100644 index 0000000000..51d2899092 --- /dev/null +++ b/share/spack/docker/config/ubuntu-1804.bash @@ -0,0 +1,15 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other +# Spack Project Developers. See the top-level COPYRIGHT file for details. +# +# SPDX-License-Identifier: (Apache-2.0 OR MIT) + +unset DISTRO +unset BASE_IMAGE +unset BASE_NAME +unset BASE_TAG +unset TAG +unset EXTRA_TAGS + +export BASE_IMAGE=ubuntu +export BASE_TAG="18.04" +export EXTRA_TAGS="bionic latest" diff --git a/share/spack/docker/config/ubuntu.bash b/share/spack/docker/config/ubuntu.bash deleted file mode 100644 index f66c6fb16f..0000000000 --- a/share/spack/docker/config/ubuntu.bash +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other -# Spack Project Developers. See the top-level COPYRIGHT file for details. -# -# SPDX-License-Identifier: (Apache-2.0 OR MIT) - -unset DISTRO -unset BASE_IMAGE -unset BASE_NAME -unset BASE_TAG -unset TAG -unset EXTRA_TAGS - -export BASE_IMAGE=ubuntu -export BASE_TAG="bionic" -export EXTRA_TAGS="latest" diff --git a/share/spack/docker/handle-ssh.sh b/share/spack/docker/handle-ssh.sh index e14c2b4331..a4587a1f9f 100644 --- a/share/spack/docker/handle-ssh.sh +++ b/share/spack/docker/handle-ssh.sh @@ -7,7 +7,12 @@ if [ "$CURRENTLY_BUILDING_DOCKER_IMAGE" '!=' '1' ] ; then uid="`id -u`" if [ "$uid" '=' '0' ] ; then - for key_type in dsa ecdsa ed25519 rsa ; do + key_types="dsa ecdsa rsa" + if [ "$DOCKERFILE_BASE" '!=' 'centos:6' ] ; then + key_types="${key_types} ed25519" + fi + + for key_type in $key_types ; do private_key_file="/etc/ssh/ssh_host_${key_type}_key" public_key_file="$private_key_file.pub" diff --git a/share/spack/qa/run-docker-tests b/share/spack/qa/run-docker-tests index f561e2f34b..8613c7e728 100755 --- a/share/spack/qa/run-docker-tests +++ b/share/spack/qa/run-docker-tests @@ -21,23 +21,9 @@ ensure_docker_login() { return $__login_success fi - if [ "$CI" '=' 'true' -a "$TRAVIS" '=' 'true' ] ; then - # NOTE: work around an issue with docker/docker hub - # https://github.com/docker/hub-feedback/issues/1222 - # https://github.com/docker/cli/issues/1180 - rm -f $HOME/.docker/config.json - fi - echo "$DOCKER_PASSWORD" | \ docker login -u "$DOCKER_USERNAME" --password-stdin - if [ "$CI" '=' 'true' -a \ - "$TRAVIS" '=' 'true' -a \ - '!' -f "$HOME/.docker/config.json" ] - then - echo "Warning: config file $HOME/.docker/config.json not created" >&2 - fi - if [ $? '=' '0' ] ; then __login_success=0 fi -- cgit v1.2.3-60-g2f50