Skip to content
Snippets Groups Projects
Commit aa1c814c authored by Omar Padron's avatar Omar Padron Committed by Todd Gamblin
Browse files

docker: unite Dockerfiles; auto-deploy images to DockerHub (#9329)

* Unite Dockerfiles - add build/run/push scripts
* update docker documentation
* update .travis.yml
* switch to using a preprocessor on Dockerfiles
* skip building docker images on pull requests
* update files with copyright info
* tweak when travis builds for docker files are done
parent 734d903b
Branches
Tags
No related merge requests found
#! /usr/bin/env bash -e
#
# Copyright 2013-2018 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)
if [ "$1" '=' 'docker-shell' ] ; then
if [ -t 0 ] ; then
exec bash -il
else
(
echo -n "It looks like you're trying to run an intractive shell"
echo -n " session, but either no psuedo-TTY is allocateed for this"
echo -n " container's STDIN, or it is closed."
echo
echo -n "Make sure you run docker with the --interactive and --tty"
echo -n " options."
echo
) >&2
exit 1
fi
else
exec 3>&1
exec 4>&2
exec 1>&-
exec 2>&-
source /etc/profile.d/spack.sh
source /etc/profile.d/handle-ssh.sh
exec 1>&3
exec 2>&4
exec 3>&-
exec 4>&-
spack "$@"
exit $?
fi
......@@ -3,6 +3,8 @@
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
if [ x$SPACK_PROMPT '!=' x0 ] ; then
__tmp="`mktemp -d`"
__trylock() {
......@@ -83,7 +85,7 @@ __git_head() {
__update_prompt() {
local prompt
prompt=''
linux_distro="$DISTRO"
linux_distro="$DOCKERFILE_DISTRO"
if [ -n "$linux_distro" ] ; then
linux_distro='\[\e[1;34m\][\[\e[0;34m\]'"$linux_distro"'\[\e[1;34m\]]'
if [ -n "$prompt" ] ; then
......@@ -163,3 +165,5 @@ __update_prompt_main() {
}
PROMPT_COMMAND=__update_prompt_main
fi # [ x$SPACK_PROMPT '!=' x0 ]
./build-image.sh
\ No newline at end of file
./build-image.sh
\ No newline at end of file
build-image.sh
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment