diff --git a/src/docker/itk-wasm/Dockerfile b/src/docker/itk-wasm/Dockerfile index efaaa1b90..308d84cb7 100644 --- a/src/docker/itk-wasm/Dockerfile +++ b/src/docker/itk-wasm/Dockerfile @@ -40,8 +40,7 @@ COPY web-build /usr/local/bin/ # Trigger Emscripten to cache builds of required system libraries ADD median-filter-pipelineCopy /median-filter-pipelineCopy -ADD populate-cache.sh /usr/local/bin/populate-cache.sh -RUN /usr/local/bin/populate-cache.sh && rm /usr/local/bin/populate-cache.sh +RUN if [ $BASE_IMAGE = "itkwasm/emscripten-base" ]; then cd /median-filter-pipelineCopy; /usr/local/bin/web-build emscripten-build -DCMAKE_EXE_LINKER_FLAGS='-flto=thin -s DISABLE_EXCEPTION_CATCHING=0'; rm -rf ./web-build; /usr/local/bin/web-build emscripten-build -DCMAKE_EXE_LINKER_FLAGS='-flto -s DISABLE_EXCEPTION_CATCHING=0'; rm -rf ./web-build; /usr/local/bin/web-build emscripten-build -DCMAKE_EXE_LINKER_FLAGS='-fno-lto -s DISABLE_EXCEPTION_CATCHING=1'; rm -rf /median-filter-pipelineCopy; chmod -R 777 /emsdk/upstream/emscripten/cache; fi # Build-time metadata as defined at http://label-schema.org ARG BUILD_DATE diff --git a/src/docker/itk-wasm/populate-cache.sh b/src/docker/itk-wasm/populate-cache.sh deleted file mode 100755 index 270485a3a..000000000 --- a/src/docker/itk-wasm/populate-cache.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -if [ $BASE_IMAGE = "itkwasm/emscripten-base" ]; then - cd /median-filter-pipelineCopy - - /usr/local/bin/web-build emscripten-build -DCMAKE_EXE_LINKER_FLAGS='-flto=thin -s DISABLE_EXCEPTION_CATCHING=0' - rm -rf ./web-build - - /usr/local/bin/web-build emscripten-build -DCMAKE_EXE_LINKER_FLAGS='-flto -s DISABLE_EXCEPTION_CATCHING=0' - rm -rf ./web-build - - /usr/local/bin/web-build emscripten-build -DCMAKE_EXE_LINKER_FLAGS='-fno-lto -s DISABLE_EXCEPTION_CATCHING=1' - - rm -rf /median-filter-pipelineCopy - chmod -R 777 /emsdk/upstream/emscripten/cache -fi