Skip to content

Commit c7cdbd9

Browse files
authored
Merge pull request #6 from stackhpc/ghcr-refresh
Update baseimage to rockylinux 10 and push to ghcr.io
2 parents d0af10a + e24d8c1 commit c7cdbd9

3 files changed

Lines changed: 16 additions & 8 deletions

File tree

.github/workflows/build-and-push-images.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,11 @@ jobs:
4747
type=raw,value=latest,enable={{is_default_branch}}
4848
4949
- name: Build and push Docker image
50-
uses: docker/build-push-action@v4
50+
uses: docker/build-push-action@v7
5151
with:
5252
context: .
53+
build-args: |
54+
SQUID_VERSION=${{ github.ref_type == 'tag' && github.ref_name || '' }}
5355
push: ${{ github.event_name != 'pull_request' }}
5456
tags: ${{ steps.meta.outputs.tags }}
5557
labels: ${{ steps.meta.outputs.labels }}

Dockerfile

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
1-
FROM rockylinux:9
1+
FROM quay.io/rockylinux/rockylinux:10
22
LABEL maintainer=StackHPC
33

4-
ENV SQUID_VERSION=5.5 \
5-
SQUID_CACHE_DIR=/var/spool/squid \
4+
ARG SQUID_VERSION=""
5+
6+
ENV SQUID_CACHE_DIR=/var/spool/squid \
67
SQUID_LOG_DIR=/var/log/squid \
78
SQUID_USER=squid
89

9-
RUN dnf install -y \
10-
which \
11-
squid-${SQUID_VERSION}
10+
RUN if [[ -z "${SQUID_VERSION}" ]]; then \
11+
dnf install -y which squid; \
12+
else \
13+
dnf install -y which squid-${SQUID_VERSION}; \
14+
fi
1215

1316
COPY squid.conf /etc/squid/squid.conf
14-
RUN chown root.squid /etc/squid/squid.conf
17+
RUN chown root:squid /etc/squid/squid.conf
1518
RUN chmod 0640 /etc/squid/squid.conf
1619

1720
COPY entrypoint.sh /sbin/entrypoint.sh

squid.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,3 +73,6 @@ refresh_pattern ^ftp: 1440 20% 10080
7373
refresh_pattern ^gopher: 1440 0% 1440
7474
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
7575
refresh_pattern . 0 20% 4320
76+
77+
# Redirect access logs to stdout
78+
access_log stdio:/dev/stdout squid

0 commit comments

Comments
 (0)