1
0
mirror of https://github.com/b4tman/docker-squid.git synced 2026-03-12 07:23:46 +00:00

Update Squid to 7.4 and replace squidclient with curl

This commit is contained in:
Dmitry Belyaev
2026-03-04 12:57:42 +03:00
parent 07d9abcbe6
commit 54797967b9
2 changed files with 4 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
FROM alpine:3.23.3 as build
ARG SQUID_VER=6.13
ARG SQUID_VER=7.4
RUN set -x && \
apk add --no-cache \
@@ -98,9 +98,6 @@ RUN set -x && \
make -j $nproc && \
make install
WORKDIR /tmp/build/tools/squidclient
RUN make && make install-strip
RUN sed -i '1s;^;include /etc/squid/conf.d/*.conf\n;' /etc/squid/squid.conf && \
echo 'include /etc/squid/conf.d.tail/*.conf' >> /etc/squid/squid.conf
@@ -121,13 +118,13 @@ RUN apk add --no-cache \
libcap \
libltdl \
apache2-utils \
curl \
tzdata
COPY --from=build /etc/squid/ /etc/squid/
COPY --from=build /usr/lib/squid/ /usr/lib/squid/
COPY --from=build /usr/share/squid/ /usr/share/squid/
COPY --from=build /usr/sbin/squid /usr/sbin/squid
COPY --from=build /usr/bin/squidclient /usr/bin/squidclient
COPY --chmod=755 run.sh /

View File

@@ -3,7 +3,7 @@ services:
proxy:
image: "${TEST_TAG}"
healthcheck:
test: ["CMD", "sh", "-exc", "squidclient -T 3 mgr:info 2> /dev/null | grep -qF '200 OK'"]
test: ["CMD", "sh", "-exc", "curl -s -o /dev/null --max-time 3 -w '%{http_code}' 'http://127.0.0.1:3128/squid-internal-mgr/info' 2> /dev/null | grep -qF '200'"]
interval: 5s
timeout: 3s
retries: 5
@@ -14,5 +14,4 @@ services:
- proxy
depends_on:
- proxy
command: sh -exc "sleep 10 && squidclient -h proxy -T 3 'https://postman-echo.com/get?squidtest=ok' 2> /dev/null | grep -qF '200 OK'"
command: sh -exc "sleep 10 && curl --proxy='http://proxy:3128' -s -o /dev/null --max-time 3 -w '%{http_code}' 'https://postman-echo.com/get?squidtest=ok' 2> /dev/null | grep -qF '200'"