From cf5f1410181af50878a69fda3187da713e8d77a6 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Thu, 4 Apr 2019 16:25:20 +1100 Subject: [PATCH] docker/base: take the configuration as a parameter Rather than unconditionally run the container with the build script we should take it as a parameter. We remove the ENTRYPOINT as a way to ease debugging these changes. --- docker/base/Dockerfile | 2 -- docker/base/build.sh | 9 +++++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/docker/base/Dockerfile b/docker/base/Dockerfile index eeaeb22..ff5c4d5 100644 --- a/docker/base/Dockerfile +++ b/docker/base/Dockerfile @@ -32,5 +32,3 @@ RUN gem install asciidoctor-diagram COPY build.sh /opt/nerdcruft/ RUN chmod a+rx /opt/nerdcruft/build.sh - -ENTRYPOINT /opt/nerdcruft/build.sh \ No newline at end of file diff --git a/docker/base/build.sh b/docker/base/build.sh index 11ccdf7..203166f 100755 --- a/docker/base/build.sh +++ b/docker/base/build.sh @@ -2,9 +2,14 @@ die() { echo "$*" 1>&2 ; exit 1; } -buildroot="/build/" +usage() { die "$0 [mingw]/" ; } + +buildroot="/work/" + +config=$1 +[ ! -z "${config}" ] || die "Empty config" +echo "Building in '${config}'" -config="release/gcc" configroot="${buildroot}/build/${config}/" mkdir -p "${buildroot}/" || die "Could not create buildroot"