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.
This commit is contained in:
Danny Robson 2019-04-04 16:25:20 +11:00
parent 541b3dddf0
commit cf5f141018
2 changed files with 7 additions and 4 deletions

View File

@ -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

View File

@ -2,9 +2,14 @@
die() { echo "$*" 1>&2 ; exit 1; }
buildroot="/build/"
usage() { die "$0 [mingw]<release|debug>/<gcc|clang>" ; }
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"