Skip to content

Commit 8669de4

Browse files
committed
Allow SQUID_VERSION to be passed as a build-arg
1 parent dde9da3 commit 8669de4

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

Dockerfile

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
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+
microdnf install -y which squid; \
12+
else \
13+
microdnf install -y which squid-${SQUID_VERSION}; \
14+
fi
1215

1316
COPY squid.conf /etc/squid/squid.conf
1417
RUN chown root:squid /etc/squid/squid.conf

0 commit comments

Comments
 (0)