Newer
Older
# ---------------------------------*-sh-*------------------------------------
# Copyright (C) 2021-2024 OpenCFD Ltd.
# SPDX-License-Identifier: (GPL-3.0-or-later)
#
# Create openfoam '-run' image for Rocky Linux using copr repo.
#
# Example
# apptainer build openfoam2406.sif openfoam-run_rocky-template.def
# apptainer build --build-arg OS_VER=8 --build-arg FOAM_VERSION=2406 ...
# --build-arg FOAM_SUBPKG=-default ...
#
# ---------------------------------------------------------------------------
Bootstrap: docker
From: rockylinux/rockylinux:{{ OS_VER }}
%files
openfoam-files.rc/* /openfoam/
%arguments
OS_VER=latest
FOAM_VERSION=2406
PACKAGE=openfoam{{ FOAM_VERSION }}
%post
dnf -y install wget rsync
dnf -y install 'dnf-command(config-manager)'
dnf -y install epel-release
crb enable
dnf -y install 'dnf-command(copr)'
dnf -y copr enable openfoam/openfoam
dnf -y install {{ PACKAGE }}
dnf -y clean all
%post
/bin/sh /openfoam/assets/post-install.sh -fix-perms -no-sudo
%runscript
exec /openfoam/run "$@"
%labels
Author OpenCFD Ltd.
Author CIQ Inc.
# ---------------------------------------------------------------------------