diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 00000000..8f6047af --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,26 @@ +name: Dockerfiles Release +on: [create] +concurrency: + group: ${{ github.workflow }}-${{ github.ref }}-${{ github.event_name }} + cancel-in-progress: true +env: + GITHUB_TOKEN: ${{ github.token }} + +jobs: + release: + if: (github.event_name == 'create' && github.event.ref_type == 'tag') + name: Release + strategy: + fail-fast: false + runs-on: ubuntu-latest + steps: + - name: Code Checkout + uses: actions/checkout@v4 + - name: Login to GitHub Container Registry + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + - name: Build and Push + run: ./build-and-push-images.sh ${{ github.event.ref }} diff --git a/build-and-push-images.sh b/build-and-push-images.sh new file mode 100755 index 00000000..12504e36 --- /dev/null +++ b/build-and-push-images.sh @@ -0,0 +1,54 @@ +#!/bin/bash + +set -eu -o pipefail + +create_image() { + local name="$1" + local ver="$2" + pushd "${name}" + docker build -t ghcr.io/clearlinux/"${name}":"${ver}" . --build-arg="clear_ver=${ver}" + popd +} + +push_image() { + local name="$1" + local ver="$2" + docker push ghcr.io/clearlinux/"${name}":"${ver}" +} + +build_and_push_image() { + local name="$1" + local ver="$2" + create_image "${name}" "${ver}" + push_image "${name}" "${ver}" +} + +main() { + local ver="$1" + build_and_push_image os-core "${ver}" + build_and_push_image clr-installer-ci "${ver}" + # httpd is used by cgit so it must be pushed first + build_and_push_image httpd "${ver}" + build_and_push_image cgit "${ver}" + build_and_push_image golang "${ver}" + build_and_push_image haproxy "${ver}" + build_and_push_image iperf "${ver}" + build_and_push_image mariadb "${ver}" + build_and_push_image memcached "${ver}" + build_and_push_image mixer-ci "${ver}" + build_and_push_image nginx "${ver}" + build_and_push_image node "${ver}" + build_and_push_image numpy-mp "${ver}" + build_and_push_image perl "${ver}" + build_and_push_image php "${ver}" + build_and_push_image php-fpm "${ver}" + build_and_push_image postgres "${ver}" + build_and_push_image python "${ver}" + build_and_push_image rabbitmq "${ver}" + build_and_push_image r-base "${ver}" + build_and_push_image redis "${ver}" + build_and_push_image ruby "${ver}" + build_and_push_image tesseract-ocr "${ver}" +} + +main $1 diff --git a/cgit/Dockerfile b/cgit/Dockerfile index 8a739bfc..3cc38d7b 100644 --- a/cgit/Dockerfile +++ b/cgit/Dockerfile @@ -1,10 +1,13 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/httpd:$clear_ver AS httpd FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/httpd:latest / /os_core_install/ +COPY --from=httpd / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/httpd:latest +FROM httpd COPY --from=builder /install_root / COPY cgitrc /etc/cgitrc diff --git a/docker-hooks.sh b/docker-hooks.sh index cd072d39..fbcf8d4c 100644 --- a/docker-hooks.sh +++ b/docker-hooks.sh @@ -68,7 +68,7 @@ function do_tag { local image=$1 local pkg=$2 local base=$3 - + echo "=> Tagging the $image" local tag=$(get_tag $pkg) diff --git a/golang/Dockerfile b/golang/Dockerfile index eb1bdb64..6c2eeb6d 100644 --- a/golang/Dockerfile +++ b/golang/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/haproxy/Dockerfile b/haproxy/Dockerfile index 09ae4c5c..b8f9bba1 100644 --- a/haproxy/Dockerfile +++ b/haproxy/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/httpd/Dockerfile b/httpd/Dockerfile index 121ef5e9..e97dd27a 100644 --- a/httpd/Dockerfile +++ b/httpd/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/iperf/Dockerfile b/iperf/Dockerfile index e7962fd2..83ef19c8 100644 --- a/iperf/Dockerfile +++ b/iperf/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/mariadb/Dockerfile b/mariadb/Dockerfile index 92f138e7..4cd36273 100644 --- a/mariadb/Dockerfile +++ b/mariadb/Dockerfile @@ -1,15 +1,18 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest as builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -24,11 +27,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/memcached/Dockerfile b/memcached/Dockerfile index c7e0586e..dd3bb1a6 100644 --- a/memcached/Dockerfile +++ b/memcached/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/nginx/Dockerfile b/nginx/Dockerfile index 547005a8..ae7b84c9 100644 --- a/nginx/Dockerfile +++ b/nginx/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / COPY default.conf /etc/nginx-mainline/conf.d/default.conf diff --git a/node/Dockerfile b/node/Dockerfile index fce75e99..e3ab55eb 100644 --- a/node/Dockerfile +++ b/node/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/numpy-mp/Dockerfile b/numpy-mp/Dockerfile index 2ab8e2bd..c673af9e 100644 --- a/numpy-mp/Dockerfile +++ b/numpy-mp/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/os-core/Dockerfile b/os-core/Dockerfile index 532b958a..a2b7a527 100644 --- a/os-core/Dockerfile +++ b/os-core/Dockerfile @@ -1,9 +1,10 @@ FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Install clean os-core bundle in target directory # using the new os version diff --git a/perl/Dockerfile b/perl/Dockerfile index 442c604a..01bf6293 100644 --- a/perl/Dockerfile +++ b/perl/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,14 +26,14 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / WORKDIR /root -CMD ["perl5.28.2","-de0"] +CMD ["perl","-de0"] diff --git a/php-fpm/Dockerfile b/php-fpm/Dockerfile index 838dbff9..a0bdbc2c 100644 --- a/php-fpm/Dockerfile +++ b/php-fpm/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/php/Dockerfile b/php/Dockerfile index 32d38585..f7849684 100644 --- a/php/Dockerfile +++ b/php/Dockerfile @@ -1,14 +1,16 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -32,11 +34,11 @@ opcache.revalidate_freq=${OPCACHE_REVALIDATE_FREQ}' >> /install_root/usr/share/d # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core ENV OPCACHE_REVALIDATE_FREQ=0 \ OPCACHE_VALIDATE_TIMESTAMPS=0 \ diff --git a/postgres/Dockerfile b/postgres/Dockerfile index 8906042a..bd348c89 100644 --- a/postgres/Dockerfile +++ b/postgres/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / @@ -42,8 +45,7 @@ RUN sed -i "s|#listen_addresses.*|listen_addresses = '*'|" /usr/share/postgresql VOLUME /var/lib/pgsql/data COPY docker-entrypoint.sh /usr/local/bin/ RUN chmod +x /usr/local/bin/docker-entrypoint.sh && \ - ln -s /usr/local/bin/docker-entrypoint.sh / && \ - ln -s /usr/share/postgresql11 /usr/share/postgresql + ln -s /usr/local/bin/docker-entrypoint.sh / ENTRYPOINT ["docker-entrypoint.sh"] diff --git a/postgres/docker-entrypoint.sh b/postgres/docker-entrypoint.sh index 8f09db9d..0026fa37 100644 --- a/postgres/docker-entrypoint.sh +++ b/postgres/docker-entrypoint.sh @@ -34,9 +34,9 @@ if [ "$1" = 'postgres' ] && [ "$(id -u)" = '0' ]; then chown -R postgres "$PGDATA" chmod 700 "$PGDATA" - mkdir -p /var/run/postgresql11 - chown -R postgres /var/run/postgresql11 - chmod 775 /var/run/postgresql11 + mkdir -p /var/run/postgresql + chown -R postgres /var/run/postgresql + chmod 775 /var/run/postgresql # Create the transaction log directory before initdb is run (below) so the directory is owned by the correct user if [ "$POSTGRES_INITDB_WALDIR" ]; then diff --git a/python/Dockerfile b/python/Dockerfile index 213a0b4f..af6d481f 100644 --- a/python/Dockerfile +++ b/python/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core ENV NAME="clearlinux-python" COPY --from=builder /install_root / diff --git a/r-base/Dockerfile b/r-base/Dockerfile index 359254fd..dbe8548a 100644 --- a/r-base/Dockerfile +++ b/r-base/Dockerfile @@ -1,15 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder - +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -24,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/rabbitmq/Dockerfile b/rabbitmq/Dockerfile index ff5fdd18..9628f333 100644 --- a/rabbitmq/Dockerfile +++ b/rabbitmq/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/redis/Dockerfile b/redis/Dockerfile index cacbba25..c2b78339 100644 --- a/redis/Dockerfile +++ b/redis/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/ruby/Dockerfile b/ruby/Dockerfile index 64d0a481..6af475fc 100644 --- a/ruby/Dockerfile +++ b/ruby/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,11 +26,11 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root / diff --git a/tesseract-ocr/Dockerfile b/tesseract-ocr/Dockerfile index a697d593..cb4f95d6 100644 --- a/tesseract-ocr/Dockerfile +++ b/tesseract-ocr/Dockerfile @@ -1,14 +1,17 @@ +ARG clear_ver +FROM ghcr.io/clearlinux/os-core:$clear_ver AS core FROM clearlinux:latest AS builder +ARG clear_ver ARG swupd_args # Move to latest Clear Linux release to ensure # that the swupd command line arguments are # correct -RUN swupd update --no-boot-update $swupd_args +RUN swupd update --no-boot-update -V $clear_ver $swupd_args # Grab os-release info from the minimal base image so # that the new content matches the exact OS version -COPY --from=clearlinux/os-core:latest /usr/lib/os-release / +COPY --from=core /usr/lib/os-release / # Install additional content in a target directory # using the os version from the minimal base @@ -23,12 +26,12 @@ RUN source /os-release && \ # file exists on different layers. To minimize docker # image size, remove the overlapped files before copy. RUN mkdir /os_core_install -COPY --from=clearlinux/os-core:latest / /os_core_install/ +COPY --from=core / /os_core_install/ RUN cd / && \ find os_core_install | sed -e 's/os_core_install/install_root/' | xargs rm -d &> /dev/null || true -FROM clearlinux/os-core:latest +FROM core COPY --from=builder /install_root /