From 0bc58aa0427a66bfab3e8523fb062c961b2b853d Mon Sep 17 00:00:00 2001 From: jUDASmILE Date: Mon, 18 May 2026 11:37:16 +0800 Subject: [PATCH 1/2] refresh goharbor photon:5.0 when create new base image Signed-off-by: jUDASmILE --- .buildbaselog | 3 +++ .github/workflows/build-package.yml | 3 +++ make/photon/common/Dockerfile | 14 ++++++++++++++ make/photon/core/Dockerfile.base | 2 +- make/photon/db/Dockerfile.base | 2 +- make/photon/exporter/Dockerfile.base | 2 +- make/photon/jobservice/Dockerfile.base | 2 +- make/photon/log/Dockerfile.base | 2 +- make/photon/nginx/Dockerfile.base | 2 +- make/photon/portal/Dockerfile.base | 2 +- make/photon/prepare/Dockerfile.base | 2 +- make/photon/registry/Dockerfile.base | 2 +- make/photon/registryctl/Dockerfile.base | 2 +- make/photon/trivy-adapter/Dockerfile.base | 2 +- make/photon/valkey/Dockerfile.base | 2 +- 15 files changed, 32 insertions(+), 12 deletions(-) create mode 100644 make/photon/common/Dockerfile diff --git a/.buildbaselog b/.buildbaselog index 0edd5f28fb8..e6975ffa88f 100644 --- a/.buildbaselog +++ b/.buildbaselog @@ -5,6 +5,9 @@ %changelog +* May 15 2026 +- Refresh base image + * Add date here... Add signature here... - Add your reason here... diff --git a/.github/workflows/build-package.yml b/.github/workflows/build-package.yml index a467f2c1e09..3a5e561ae72 100644 --- a/.github/workflows/build-package.yml +++ b/.github/workflows/build-package.yml @@ -51,6 +51,9 @@ jobs: github.ref == 'refs/heads/main' run: | set -x + echo "${{ secrets.DOCKER_HUB_PASSWORD }}" | docker login -u "${{ secrets.DOCKER_HUB_USERNAME }}" --password-stdin + docker build -f make/photon/common/Dockerfile -t goharbor/photon:5.0 . + docker push goharbor/photon:5.0 echo "BUILD_BASE=true" >> $GITHUB_ENV - name: Build Package run: | diff --git a/make/photon/common/Dockerfile b/make/photon/common/Dockerfile new file mode 100644 index 00000000000..29861365646 --- /dev/null +++ b/make/photon/common/Dockerfile @@ -0,0 +1,14 @@ +FROM photon:5.0 + +# 1. Install photon-repos package +RUN tdnf install photon-repos -y + +# 2. Enable photon-snapshot repo +RUN sed -i 's/enabled\s*=.*/enabled=0/g' /etc/yum.repos.d/*.repo +RUN sed -i 's/enabled\s*=.*/enabled=1/g' /etc/yum.repos.d/photon-snapshot.repo && tdnf clean all + +# 2. Use tdnf to disable all default repos, enable only the snapshot, and update/install +# The --disablerepo="*" flag turns off the mainline public repos +# The --enablerepo="photon-snapshot" flag explicitly targets your template +RUN tdnf --disablerepo="*" --enablerepo="photon-snapshot" makecache \ + && tdnf --disablerepo="*" --enablerepo="photon-snapshot" update -y diff --git a/make/photon/core/Dockerfile.base b/make/photon/core/Dockerfile.base index a6c7f097c97..17484f61f2b 100644 --- a/make/photon/core/Dockerfile.base +++ b/make/photon/core/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y tzdata shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/db/Dockerfile.base b/make/photon/db/Dockerfile.base index 6c816cc8171..4951c995b8e 100644 --- a/make/photon/db/Dockerfile.base +++ b/make/photon/db/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 ENV PGDATA /var/lib/postgresql/data diff --git a/make/photon/exporter/Dockerfile.base b/make/photon/exporter/Dockerfile.base index a6c7f097c97..17484f61f2b 100644 --- a/make/photon/exporter/Dockerfile.base +++ b/make/photon/exporter/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y tzdata shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/jobservice/Dockerfile.base b/make/photon/jobservice/Dockerfile.base index 7157c6c59c0..1a27b4264c2 100644 --- a/make/photon/jobservice/Dockerfile.base +++ b/make/photon/jobservice/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y tzdata shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/log/Dockerfile.base b/make/photon/log/Dockerfile.base index ab20227b6cf..b842d237d94 100644 --- a/make/photon/log/Dockerfile.base +++ b/make/photon/log/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y cronie rsyslog logrotate shadow tar gzip sudo >> /dev/null\ && mkdir /var/spool/rsyslog \ diff --git a/make/photon/nginx/Dockerfile.base b/make/photon/nginx/Dockerfile.base index d6a18e543fc..8dbf7f26c00 100644 --- a/make/photon/nginx/Dockerfile.base +++ b/make/photon/nginx/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y nginx shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/portal/Dockerfile.base b/make/photon/portal/Dockerfile.base index 7d078696a6d..0aabd19441a 100644 --- a/make/photon/portal/Dockerfile.base +++ b/make/photon/portal/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y nginx shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/prepare/Dockerfile.base b/make/photon/prepare/Dockerfile.base index 47b2ac848d4..c509f599126 100644 --- a/make/photon/prepare/Dockerfile.base +++ b/make/photon/prepare/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y python3 python3-pip python3-PyYAML python3-jinja2 && tdnf clean all ARG pip_index_url=https://pypi.org/simple diff --git a/make/photon/registry/Dockerfile.base b/make/photon/registry/Dockerfile.base index 3c4a465e6ac..04c30f55d68 100644 --- a/make/photon/registry/Dockerfile.base +++ b/make/photon/registry/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/registryctl/Dockerfile.base b/make/photon/registryctl/Dockerfile.base index 09809d6d4cc..69fe61c3bdf 100644 --- a/make/photon/registryctl/Dockerfile.base +++ b/make/photon/registryctl/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/trivy-adapter/Dockerfile.base b/make/photon/trivy-adapter/Dockerfile.base index 41a6bb740ab..6236fdec2de 100644 --- a/make/photon/trivy-adapter/Dockerfile.base +++ b/make/photon/trivy-adapter/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y rpm shadow >> /dev/null \ && tdnf clean all \ diff --git a/make/photon/valkey/Dockerfile.base b/make/photon/valkey/Dockerfile.base index 85cb09a3670..563209b1fca 100644 --- a/make/photon/valkey/Dockerfile.base +++ b/make/photon/valkey/Dockerfile.base @@ -1,4 +1,4 @@ -FROM photon:5.0 +FROM goharbor/photon:5.0 RUN tdnf install -y shadow >> /dev/null \ && groupadd -g 999 valkey \ From a0c4d816b0234d7920036010211ac54287eec0bc Mon Sep 17 00:00:00 2001 From: jUDASmILE Date: Mon, 18 May 2026 11:54:56 +0800 Subject: [PATCH 2/2] correct date and format in buildbaselog Signed-off-by: jUDASmILE --- .buildbaselog | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.buildbaselog b/.buildbaselog index e6975ffa88f..80b5ddd5bd3 100644 --- a/.buildbaselog +++ b/.buildbaselog @@ -5,12 +5,12 @@ %changelog -* May 15 2026 -- Refresh base image - * Add date here... Add signature here... - Add your reason here... +* May 18 2026 +- Refresh base image + * Feb 11 2026 - Refresh base image