File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -120,13 +120,13 @@ RUN apt-get update && \
120120#
121121# NOTE: We use a read-only mount (no `readwrite`) because Docker 29.x's
122122# built-in BuildKit has a bug where `--mount=src=.,readwrite` mounts an
123- # empty directory instead of exposing the build context. We work around
124- # it by mounting the context read-only at /tmp/src and copying only the
125- # small set of files uberenv actually needs into the writable container
126- # filesystem before running.
123+ # empty directory instead of exposing the build context. We also mount the
124+ # uberenv submodule as a separate named context, because BuildKit's git-aware
125+ # handling of the main repo context drops submodule contents.
127126RUN --mount=src=.,dst=/tmp/src \
128- mkdir -p ${SRC_DIR}/scripts ${GEOSX_TPL_DIR} && \
129- cp -r /tmp/src/docker/_uberenv_bundle ${SRC_DIR}/scripts/uberenv && \
127+ --mount=from=uberenv,target=/tmp/uberenv \
128+ mkdir -p ${SRC_DIR}/scripts/uberenv ${GEOSX_TPL_DIR} && \
129+ cp -r /tmp/uberenv/. ${SRC_DIR}/scripts/uberenv/ && \
130130 cp -r /tmp/src/scripts/spack_packages ${SRC_DIR}/scripts/ && \
131131 cp -r /tmp/src/scripts/spack_configs ${SRC_DIR}/scripts/ && \
132132 cp /tmp/src/.uberenv_config.json ${SRC_DIR}/ && \
Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ echo .git > .dockerignore
77
88# Get uberenv submodule
99git submodule update --init --force scripts/uberenv
10- # BuildKit's git-aware context builder treats submodules as gitlinks and sends
11- # only an empty directory placeholder for them. Work around this by copying
12- # uberenv into a plain (non-submodule) path that BuildKit will include in full.
13- rm -rf docker/_uberenv_bundle
14- cp -r scripts/uberenv docker/_uberenv_bundle
1510
1611
1712# This script will build an image from TPL_DOCKERFILE
@@ -27,6 +22,7 @@ INSTALL_DIR=${INSTALL_DIR_ROOT}/GEOS_TPL-${DOCKER_TAG}-${COMMIT:0:7}
2722echo " Installation directory is ${INSTALL_DIR} "
2823
2924docker build --progress=plain ${DOCKER_COMPILER_BUILD_ARG} \
25+ --build-context uberenv=./scripts/uberenv \
3026--build-arg HOST_CONFIG=${HOST_CONFIG} \
3127--build-arg DOCKER_ROOT_IMAGE=${DOCKER_ROOT_IMAGE} \
3228--build-arg INSTALL_DIR=${INSTALL_DIR} \
Original file line number Diff line number Diff line change @@ -162,6 +162,7 @@ install_dir="${install_dir_root}/GEOS_TPL-${docker_tag}-${commit_sha:0:7}"
162162docker_args=(
163163 build
164164 --progress=plain
165+ --build-context " uberenv=${repo_root} /scripts/uberenv"
165166 --build-arg " DOCKER_ROOT_IMAGE=${docker_root_image} "
166167 --build-arg " AMDGPU_TARGET=${amdgpu_target} "
167168 --build-arg " INSTALL_DIR=${install_dir} "
You can’t perform that action at this time.
0 commit comments