diff --git a/.github/workflows/image-build.yml b/.github/workflows/image-build.yml index 0c65fdc..cbfd3af 100644 --- a/.github/workflows/image-build.yml +++ b/.github/workflows/image-build.yml @@ -26,7 +26,7 @@ jobs: ImageBuild: strategy: matrix: - os: [fedora, suse, debian, ubuntu] + os: [fedora, suse, debian, ubuntu, rocky] lang: [c,latex] runs-on: ubuntu-latest steps: diff --git a/Containerfile.rocky b/Containerfile.rocky new file mode 100644 index 0000000..963751f --- /dev/null +++ b/Containerfile.rocky @@ -0,0 +1,29 @@ +FROM docker.io/library/rockylinux:8 + +LABEL maintainer="Michael Adam " + +ARG BUILD_LANG="" +ARG INSTALL_SCRIPT="" +ARG VERIFY_SCRIPT="" + +LABEL org.opencontainers.image.title="${BUILD_LANG} Build Container" +LABEL org.opencontainers.image.description="Rocky Linux Container for building ${BUILD_LANG} projects" +LABEL org.opencontainers.image.vendor="buildbox" +LABEL org.opencontainers.image.url="https://github.com/TheBuildBox/buildbox" + + + +COPY "${VERIFY_SCRIPT}" /usr/local/bin/verify.sh +COPY common.sh /usr/local/bin/common.sh +RUN chmod +x /usr/local/bin/verify.sh +COPY "${INSTALL_SCRIPT}" /usr/local/bin/install-packages.sh +RUN chmod +x /usr/local/bin/install-packages.sh +# force a sane PATH for the duration of the install +ENV PATH=/usr/local/bin:/usr/bin:/bin:/sbib:/usr/local/sbin:/usr/sbin +# install, fix, and verify in ONE ATOMIC STEP +RUN true && \ +/usr/local/bin/install-packages.sh && \ +echo "Verifying binaries before layer commit..." && \ +/usr/local/bin/verify.sh && \ +echo "your buildbox is ready." + diff --git a/README.md b/README.md index b97b54d..9d8c6eb 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,7 @@ It is however of course also possible to use the images interactively. * Debian Linux * Ubuntu Linux * openSUSE Linux +* Rocky Linux ### Existing Language variants/installed tools diff --git a/cli/builbo b/cli/builbo index b964422..1ec40a7 100755 --- a/cli/builbo +++ b/cli/builbo @@ -49,7 +49,7 @@ These are the supported options: [ -l | --lang (c|latex) ] - compilation language (default: $LANG) [ -r | --registry (quay.io|... ] - container registry (default: $REGISTRY) [ -c | --container-cmd (podman|docker) ] - default: $CONTAINER_CMD (auto-detected) -[ -o | --os (fedora|debian|ubuntu|suse) ] - linux distro (default: $OS) +[ -o | --os (fedora|debian|ubuntu|rocky|suse) ] - linux distro (default: $OS) [ -n | --registry-namespace (...) ] - default: $NAMESPACE [ -s | --build-script (command|path) ] - command or local script (in the CWD) for building the project. [ -d | --deps (pkg,pkg,pkg,...) ] - additional packages to install (comma-separated) diff --git a/install-packages_rocky_c.sh b/install-packages_rocky_c.sh new file mode 100644 index 0000000..248d24c --- /dev/null +++ b/install-packages_rocky_c.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + + set -euo pipefail + + + dnf group install -y "Development Tools" && \ + dnf install -y git gcc make cmake automake autoconf vim less python3 + + RC=$? + + if [ ${RC} -eq 0 ]; then + echo "successfully installed packages." + else + echo "error installing packages." + fi + + exit ${RC} + diff --git a/install-packages_rocky_latex.sh b/install-packages_rocky_latex.sh new file mode 100644 index 0000000..5ad3d68 --- /dev/null +++ b/install-packages_rocky_latex.sh @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + set -euo pipefail + + + dnf --refresh upgrade -y && \ + dnf group install -y "Development Tools" && \ + dnf install -y \ + ghostscript \ + texlive \ + texlive-beamer \ + texlive-amscls \ + texlive-amsmath \ + texlive-amsfonts \ + texlive-bibtex \ + texlive-makeindex \ + texlive-metafont \ + texlive-cm-super \ + texlive-dvips \ + texlive-bibtex\ + texlive-makeindex \ + texlive-fancyhdr \ + texlive-cm \ + texlive-metafont\ + texlive-ec \ + texlive-cm-super && \ + dnf clean all && \ + echo "DONE dnf install and clean. now syncing." && \ + sync + + RC=$? + +#wiki2beamer: use the legacy RPM (The Fedora 38 package) + + if [ ${RC} -eq 0 ]; then + echo "SUCCESSfully installed packages." + else + echo "ERROR installing packages." + fi + + exit ${RC} +