1
0
mirror of https://github.com/b4tman/docker-squid.git synced 2026-07-27 10:42:54 +03:00

Compare commits

..

19 Commits

Author SHA1 Message Date
dependabot[bot] 7507dc1bd5 Bump alpine from 3.23.4 to 3.24.1
Bumps alpine from 3.23.4 to 3.24.1.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.24.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-04 20:55:54 +03:00
dependabot[bot] 9953814fdd Bump actions/cache from 5.0.5 to 6.1.0
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.5 to 6.1.0.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5.0.5...v6.1.0)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 6.1.0
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-04 20:08:10 +03:00
dependabot[bot] 4bd4e1b780 Bump actions/checkout from 6 to 7
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v6...v7)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-07-04 16:01:31 +03:00
b4tman 2e259018be download .xz instead of .gz (broken 7.6 .gz.asc) 2026-06-11 15:09:16 +03:00
b4tman 25571919e3 bump squid to 7.6 2026-06-11 15:09:16 +03:00
dependabot[bot] 365509ac6f Bump alpine from 3.23.3 to 3.23.4
Bumps alpine from 3.23.3 to 3.23.4.

---
updated-dependencies:
- dependency-name: alpine
  dependency-version: 3.23.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-02 17:43:25 +03:00
dependabot[bot] 66bb07f90f Bump docker/login-action from 3 to 4
Bumps [docker/login-action](https://github.com/docker/login-action) from 3 to 4.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-02 15:56:55 +03:00
dependabot[bot] bf5d4b5204 Bump actions/cache from 5.0.4 to 5.0.5
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.4 to 5.0.5.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5.0.4...v5.0.5)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-05-02 14:59:23 +03:00
dependabot[bot] 38b02d14fd Bump docker/build-push-action from 6 to 7
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 6 to 7.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v6...v7)

---
updated-dependencies:
- dependency-name: docker/build-push-action
  dependency-version: '7'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 16:56:30 +03:00
dependabot[bot] 04e457ba53 Bump docker/setup-qemu-action from 3 to 4
Bumps [docker/setup-qemu-action](https://github.com/docker/setup-qemu-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-qemu-action/releases)
- [Commits](https://github.com/docker/setup-qemu-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-qemu-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 16:56:11 +03:00
dependabot[bot] b1ca8a345b Bump docker/setup-buildx-action from 3 to 4
Bumps [docker/setup-buildx-action](https://github.com/docker/setup-buildx-action) from 3 to 4.
- [Release notes](https://github.com/docker/setup-buildx-action/releases)
- [Commits](https://github.com/docker/setup-buildx-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: docker/setup-buildx-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 14:54:38 +03:00
dependabot[bot] 2163ad1e6b Bump docker/metadata-action from 5 to 6
Bumps [docker/metadata-action](https://github.com/docker/metadata-action) from 5 to 6.
- [Release notes](https://github.com/docker/metadata-action/releases)
- [Commits](https://github.com/docker/metadata-action/compare/v5...v6)

---
updated-dependencies:
- dependency-name: docker/metadata-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 13:46:40 +03:00
dependabot[bot] 9c7cd164d8 Bump actions/cache from 5.0.3 to 5.0.4
Bumps [actions/cache](https://github.com/actions/cache) from 5.0.3 to 5.0.4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v5.0.3...v5.0.4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-version: 5.0.4
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-02 12:43:57 +03:00
b4tman 8a78e188ec bump squid to 7.5 2026-03-16 16:59:26 +03:00
Dmitry Belyaev d365d6da53 chore: add dalink sponsor link first [skip ci] 2026-03-13 12:43:29 +03:00
Dmitry Belyaev b8df13a7d6 Fix Dockerfile and Compose deprecation warnings 2026-03-05 14:23:55 +03:00
Dmitry Belyaev 35953b314c Update README configuration options 2026-03-05 13:56:44 +03:00
Dmitry Belyaev 54797967b9 Update Squid to 7.4 and replace squidclient with curl 2026-03-04 13:07:25 +03:00
Dmitry Belyaev 07d9abcbe6 Add apache2-utils package for auth tooling 2026-03-04 11:07:58 +03:00
6 changed files with 42 additions and 38 deletions
+1 -1
View File
@@ -1 +1 @@
custom: ['https://boosty.to/0xffff']
custom: ['https://dalink.to/b4tman1', 'https://boosty.to/0xffff']
+19 -19
View File
@@ -23,23 +23,23 @@ jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: b4tman
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v5.0.3
uses: actions/cache@v6.1.0
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -47,7 +47,7 @@ jobs:
${{ runner.os }}-buildx-
- name: Build squid image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: false
@@ -75,7 +75,7 @@ jobs:
sed -i "s%FROM b4tman/squid%FROM $TEST_TAG%" ssl-bump/Dockerfile
- name: Build 'ssl-bump' image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: false
@@ -102,11 +102,11 @@ jobs:
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v6
- uses: actions/checkout@v7
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: |
b4tman/squid
@@ -120,7 +120,7 @@ jobs:
- name: Docker meta (ssl-bump)
id: meta_ssl_bump
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: |
b4tman/squid
@@ -135,7 +135,7 @@ jobs:
- name: Docker meta (ssl-bump ghcr)
id: meta_ssl_bump_ghcr
uses: docker/metadata-action@v5
uses: docker/metadata-action@v6
with:
images: |
ghcr.io/b4tman/squid-ssl-bump
@@ -147,13 +147,13 @@ jobs:
type=semver,pattern={{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
uses: docker/setup-buildx-action@v4
- name: Cache Docker layers
uses: actions/cache@v5.0.3
uses: actions/cache@v6.1.0
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -161,20 +161,20 @@ jobs:
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
username: b4tman
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v3
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build squid image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: .
push: true
@@ -193,7 +193,7 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Build 'ssl-bump' image
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ssl-bump
push: true
@@ -213,7 +213,7 @@ jobs:
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Build 'ssl-bump' image for ghcr
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ssl-bump
push: true
+11 -13
View File
@@ -1,6 +1,6 @@
FROM alpine:3.23.3 as build
FROM alpine:3.24.1 AS build
ARG SQUID_VER=6.13
ARG SQUID_VER=7.6
RUN set -x && \
apk add --no-cache \
@@ -24,8 +24,8 @@ RUN set -x && \
WORKDIR /tmp/build
RUN set -x && \
curl -fSsL "https://github.com/squid-cache/squid/releases/download/SQUID_${SQUID_VER//./_}/squid-${SQUID_VER}.tar.gz" -o squid-${SQUID_VER}.tar.gz && \
curl -fSsL "https://github.com/squid-cache/squid/releases/download/SQUID_${SQUID_VER//./_}/squid-${SQUID_VER}.tar.gz.asc" -o squid-${SQUID_VER}.tar.gz.asc
curl -fSsL "https://github.com/squid-cache/squid/releases/download/SQUID_${SQUID_VER//./_}/squid-${SQUID_VER}.tar.xz" -o squid-${SQUID_VER}.tar.xz && \
curl -fSsL "https://github.com/squid-cache/squid/releases/download/SQUID_${SQUID_VER//./_}/squid-${SQUID_VER}.tar.xz.asc" -o squid-${SQUID_VER}.tar.xz.asc
COPY squid-keys.asc /tmp/build
@@ -33,11 +33,11 @@ RUN set -x && \
GNUPGHOME="$(mktemp -d)" && \
export GNUPGHOME && \
gpg --import squid-keys.asc && \
gpg --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
gpg --batch --verify squid-${SQUID_VER}.tar.xz.asc squid-${SQUID_VER}.tar.xz && \
rm -rf "$GNUPGHOME"
RUN set -x && \
tar --strip 1 -xzf squid-${SQUID_VER}.tar.gz && \
tar --strip 1 -xf squid-${SQUID_VER}.tar.xz && \
\
MACHINE=$(uname -m) && \
\
@@ -98,18 +98,15 @@ 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
# --- --- --- --- --- --- --- --- ---
FROM alpine:3.23.3
FROM alpine:3.24.1
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
ENV TZ Europe/Moscow
ENV SQUID_CONFIG_FILE=/etc/squid/squid.conf
ENV TZ=Europe/Moscow
RUN set -x && \
deluser squid 2>/dev/null; delgroup squid 2>/dev/null; \
@@ -120,13 +117,14 @@ RUN apk add --no-cache \
heimdal-libs \
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 /
+9
View File
@@ -32,10 +32,19 @@ docker-compose up
By default, the image now includes a local network allow-list (`/etc/squid/conf.d/localnet.conf`) so clients from RFC1918/RFC4193 ranges can connect without mounting an extra ACL file.
The image also includes `apache2-utils`, so you can generate and manage `htpasswd` files directly in the container for basic authentication setups.
## Environment variables:
- **SQUID_CONFIG_FILE**: Specify the configuration file for squid. Defaults to `/etc/squid/squid.conf`.
- **TZ**: Override the container timezone (for example, `Europe/Berlin`).
You can configure Squid in multiple ways:
- Replace the main configuration file by overriding `SQUID_CONFIG_FILE`.
- Add configuration snippets to `/etc/squid/conf.d`: all `*.conf` files from this directory are included at the **beginning** of the default configuration.
- Add configuration snippets to `/etc/squid/conf.d.tail`: all `*.conf` files from this directory are included at the **end** of the default configuration.
## Example:
+2 -4
View File
@@ -1,9 +1,8 @@
version: '2.3'
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 +13,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'"
-1
View File
@@ -1,4 +1,3 @@
version: '2'
services:
squid:
image: 'b4tman/squid'