Skip to content

Commit 793b1bf

Browse files
committed
rocky-container-stackhpc: configurable base image version
Set ROCKY_VERSION=9.6 to continue building images based on 9.6 when 9.7 is out.
1 parent 59da1ec commit 793b1bf

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

elements/rocky-container-stackhpc/README.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@ upstream Rocky repository mirrors.
1515
to build an image from, and should also be passed as a build-arg.
1616
``ROCKY_CUSTOM_DNF_MIRROR_URLS`` will be removed from the final image.
1717

18+
Pass ``ROCKY_VERSION`` as a build-arg to specify a rockylinux/rockylinux tag.
19+
Otherwise the floating tag for version 9 will be used. This can surprise you
20+
when a new Rocky Linux minor release is out and the tag is updated, so you should
21+
include the minor version in the tag (eg ``ROCKY_VERSION=9.7``).
22+
1823
Use ``DIB_CONTAINERFILE_BUILDOPTS`` to pass through build args to the container
1924
engine:
2025

2126
.. code-block:: yaml
2227
DIB_CONTAINERFILE_BUILDOPTS: >-
2328
--build-arg=ROCKY_USE_CUSTOM_DNF_MIRRORS=true
2429
--build-arg=ROCKY_CUSTOM_DNF_MIRROR_URLS=http://localhost/rocky/9/AppStream/x86_64/os/,http://localhost/rocky/9/BaseOS/x86_64/os/
30+
--build-arg=ROCKY_VERSION=9.7
2531
2632
Set ``DIB_ROCKY_CONTAINER_STACKHPC_RESTORE_UPSTREAM_REPOFILES=true`` to restore the
27-
upstream Rocky repository mirror configuration in the final image.
33+
upstream Rocky repository mirror configuration in the final image.

elements/rocky-container-stackhpc/containerfiles/9-stackhpc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Based on https://github.com/openstack/diskimage-builder/blob/master/diskimage_builder/elements/rocky-container/containerfiles/9
2-
3-
FROM docker.io/rockylinux/rockylinux:9
2+
# For least surprise when a new minor version is out, specify the full version, eg `ROCKY_VERSION=9.7`
3+
ARG ROCKY_VERSION=9
4+
FROM docker.io/rockylinux/rockylinux:${ROCKY_VERSION}
45
ARG ROCKY_USE_CUSTOM_DNF_MIRRORS="false"
56
# Comma-delimited list of repo URLs
67
ARG ROCKY_CUSTOM_DNF_MIRROR_URLS

0 commit comments

Comments
 (0)