From 9ef29468dd2675a947a65f1d90efe53dc2724ba3 Mon Sep 17 00:00:00 2001 From: AdamSimpson Date: Mon, 5 Feb 2018 20:12:40 -0500 Subject: [PATCH] Improve docker backend building --- Builder/scripts/docker-builder-backend.sh | 6 +++--- Client/src/main.cpp | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Builder/scripts/docker-builder-backend.sh b/Builder/scripts/docker-builder-backend.sh index 5040e01..3a29b4a 100755 --- a/Builder/scripts/docker-builder-backend.sh +++ b/Builder/scripts/docker-builder-backend.sh @@ -47,16 +47,16 @@ docker ${DEBUG_FLAG} run -d -p 5000:5000 --restart=always --name registry regist # Build the Dockerfile docker image in the current directory mv ./container.def Dockerfile -docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } +/usr/bin/unbuffer /usr/bin/docker ${DEBUG_FLAG} build -t localhost:5000/docker_image:latest . || { echo 'Build Failed' ; exit 1; } # Push to the local registry -docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest +/usr/bin/unbuffer /usr/bin/docker ${DEBUG_FLAG} push localhost:5000/docker_image:latest # Build the singularity container from the docker image export SINGULARITY_CACHEDIR=/home/builder/.singularity export SINGULARITY_NOHTTPS=true export SINGULARITY_PULLFOLDER=/home/builder -singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image:latest +/usr/bin/unbuffer /usr/bin/singularity ${DEBUG_FLAG} pull --name container.simg docker://localhost:5000/docker_image:latest # Workaround for PULLFOLDER not being respected: https://github.com/singularityware/singularity/pull/855 if [ -e ${SINGULARITY_CACHEDIR}/container.simg ] ; then diff --git a/Client/src/main.cpp b/Client/src/main.cpp index 1d283cf..b843350 100644 --- a/Client/src/main.cpp +++ b/Client/src/main.cpp @@ -315,6 +315,7 @@ int main(int argc, char *argv[]) { // Read container from builder read_file(builder_stream, client_data.container_path); + Logger::info("Images created at " + client_data.container_path); } catch (const boost::exception &ex) { auto diagnostics = diagnostic_information(ex); Logger::error(std::string() + "Container Builder exception encountered: " + diagnostics);