From 7e2e063979a3079d616b03b5d8b3b2c0551977f8 Mon Sep 17 00:00:00 2001 From: Harmen Stoppels Date: Wed, 20 Dec 2023 11:54:41 +0100 Subject: containers.rst: small docs improvement (#41792) --- lib/spack/docs/containers.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/spack/docs/containers.rst b/lib/spack/docs/containers.rst index 0033a081d3..cb0421f2fe 100644 --- a/lib/spack/docs/containers.rst +++ b/lib/spack/docs/containers.rst @@ -41,7 +41,7 @@ just have to configure and OCI registry and run ``spack buildcache push``. spack -e . mirror add --oci-username ... --oci-password ... container-registry oci://example.com/name/image # Push the image - spack -e . buildcache push --base-image ubuntu:22.04 --tag my_env container-registry + spack -e . buildcache push --update-index --base-image ubuntu:22.04 --tag my_env container-registry The resulting container image can then be run as follows: @@ -66,7 +66,8 @@ Linux distribution as long as the libc is compatible. For convenience, Spack also turns the OCI registry into a :ref:`build cache `, so that future ``spack install`` of the environment will simply pull the binaries from the -registry instead of doing source builds. +registry instead of doing source builds. The flag ``--update-index`` is needed to make Spack +take the build cache into account when concretizing. .. note:: -- cgit v1.2.3-60-g2f50