-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
README.md: build image with older spack, spack-packages, spack-config (…
…#174) * Also added Tommy's feedback on describing the difference between the two build examples.
- Loading branch information
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
### Building Docker containers for local testing | ||
## Requirements | ||
|
||
To build: | ||
* Build a container using the same OS, `spack`, `spack-packages` and `spack-config` versions as an official release of a product built via Spack. e.g. Rocky Linux 8.10, `spack` `v0.20`, `spack-packages` `2024.03.22`, `spack-config` `2024.03.22`. | ||
|
||
* `spack` (branch-based versioning) and `spack-config` (directory-based versioning) are versioned based on the Spack version. Since `spack-packages` is not versioned, we have to use tags, e.g. `2024.03.22`, to extract an older version that was created to be used with an older version of Spack. | ||
|
||
## How to build Docker images | ||
|
||
To build an image with defaults: | ||
|
||
docker build -f Dockerfile.base-spack -t <name>:<version> --target dev --no-cache --progress=plain . | ||
|
||
To build an image with specific versions of `spack`, `spack-packages` and `spack-config`: | ||
|
||
docker build -f Dockerfile.base-spack -t spack-dev:v0.20 --target dev --build-arg SPACK_VERSION=v0.20 --build-arg SPACK_PACKAGES_REPO_VERSION=2024.03.22 --build-arg SPACK_CONFIG_REPO_VERSION=2024.03.22 --no-cache --progress=plain . | ||
|
||
To run: | ||
|
||
docker run -it --rm <name>:<version> |