1
0
mirror of https://github.com/b4tman/docker-squid.git synced 2025-07-20 19:33:27 +00:00

23 Commits

Author SHA1 Message Date
dependabot[bot]
bc1e2c287d Bump alpine from 3.21.3 to 3.22.0
Bumps alpine from 3.21.3 to 3.22.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-06-02 17:23:14 +03:00
8723ca0ca8 github actions: use latest ubuntu [skip ci] 2025-06-02 17:10:42 +03:00
dependabot[bot]
89f53c9af2 Bump actions/cache from 4.2.2 to 4.2.3
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.2 to 4.2.3.
- [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/v4.2.2...v4.2.3)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-04-01 10:58:35 +03:00
dependabot[bot]
883a36790a Bump alpine from 3.21.2 to 3.21.3
Bumps alpine from 3.21.2 to 3.21.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 13:36:42 +03:00
dependabot[bot]
3ff6520eeb Bump actions/cache from 4.2.0 to 4.2.2
Bumps [actions/cache](https://github.com/actions/cache) from 4.2.0 to 4.2.2.
- [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/v4.2.0...v4.2.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-03-01 12:27:17 +03:00
3877c77b6f update squid to 6.13 (#147)
* bump squid to 6.13

* fix download links
2025-02-22 17:56:04 +03:00
dependabot[bot]
eb2cea4f44 Bump alpine from 3.21.0 to 3.21.2
Bumps alpine from 3.21.0 to 3.21.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-01 16:44:49 +03:00
dependabot[bot]
39e61037cb Bump alpine from 3.20.3 to 3.21.0
Bumps alpine from 3.20.3 to 3.21.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-28 08:41:45 +03:00
dependabot[bot]
1e431e392b Bump actions/cache from 4.1.2 to 4.2.0
Bumps [actions/cache](https://github.com/actions/cache) from 4.1.2 to 4.2.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/v4.1.2...v4.2.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
2025-01-08 18:31:03 +03:00
dependabot[bot]
c75d1354aa Bump actions/cache from 4.0.2 to 4.1.2
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.2 to 4.1.2.
- [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/v4.0.2...v4.1.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-11-01 10:58:48 +03:00
000a827460 Create FUNDING.yml [skip ci] 2024-10-07 10:05:12 +03:00
dependabot[bot]
8dab59fee5 Bump alpine from 3.20.2 to 3.20.3
Bumps alpine from 3.20.2 to 3.20.3.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-01 09:02:30 +03:00
dependabot[bot]
8669f6e1d5 Bump alpine from 3.20.1 to 3.20.2
Bumps alpine from 3.20.1 to 3.20.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-01 09:08:53 +03:00
dependabot[bot]
0978b18b73 Bump docker/build-push-action from 5 to 6
Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 5 to 6.
- [Release notes](https://github.com/docker/build-push-action/releases)
- [Commits](https://github.com/docker/build-push-action/compare/v5...v6)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 21:55:50 +03:00
dependabot[bot]
63cf1fc739 Bump alpine from 3.20.0 to 3.20.1
Bumps alpine from 3.20.0 to 3.20.1.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-01 12:11:24 +03:00
9aec6fae6a bump squid to 6.10 2024-06-19 12:30:56 +03:00
dependabot[bot]
75b290de69 Bump alpine from 3.19.1 to 3.20.0
Bumps alpine from 3.19.1 to 3.20.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-01 12:39:40 +03:00
8aab792bc1 bump squid to 6.9 2024-04-24 12:55:07 +03:00
dependabot[bot]
7ea8a5793f Bump actions/cache from 4.0.1 to 4.0.2
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.1 to 4.0.2.
- [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/v4.0.1...v4.0.2)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-04-01 08:54:55 +03:00
a3b674e1d5 CMD /run.sh 2024-03-26 12:32:52 +03:00
2bd55e0a98 fix timezone setup #133 2024-03-26 12:09:03 +03:00
fb56ae5164 bump squid to 6.8 2024-03-24 12:50:45 +03:00
dependabot[bot]
bb4a85b410 Bump actions/cache from 4.0.0 to 4.0.1
Bumps [actions/cache](https://github.com/actions/cache) from 4.0.0 to 4.0.1.
- [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/v4.0.0...v4.0.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-01 09:05:29 +03:00
4 changed files with 35 additions and 22 deletions

1
.github/FUNDING.yml vendored Normal file

@@ -0,0 +1 @@
custom: ['https://boosty.to/0xffff', 'https://www.donationalerts.com/r/b4tman1']

@@ -4,7 +4,7 @@ on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
- master
- v5
# Publish `v1.2.3` tags as releases.
@@ -21,7 +21,7 @@ env:
jobs:
test:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@@ -39,7 +39,7 @@ jobs:
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v4.0.0
uses: actions/cache@v4.2.3
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@v5
uses: docker/build-push-action@v6
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@v5
uses: docker/build-push-action@v6
with:
context: .
push: false
@@ -99,7 +99,7 @@ jobs:
docker compose -f docker-compose.test.yml down
push:
needs: test
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v4
@@ -153,7 +153,7 @@ jobs:
uses: docker/setup-buildx-action@v3
- name: Cache Docker layers
uses: actions/cache@v4.0.0
uses: actions/cache@v4.2.3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
@@ -174,7 +174,7 @@ jobs:
password: ${{ secrets.CR_PAT }}
- name: Build squid image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
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@v5
uses: docker/build-push-action@v6
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@v5
uses: docker/build-push-action@v6
with:
context: ssl-bump
push: true

@@ -1,6 +1,6 @@
FROM alpine:3.19.1 as build
FROM alpine:3.22.0 as build
ARG SQUID_VER=6.7
ARG SQUID_VER=6.13
RUN set -x && \
apk add --no-cache \
@@ -24,8 +24,8 @@ RUN set -x && \
WORKDIR /tmp/build
RUN set -x && \
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz -o squid-${SQUID_VER}.tar.gz && \
curl -SsL http://www.squid-cache.org/Versions/v${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.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
COPY squid-keys.asc /tmp/build
@@ -106,7 +106,7 @@ RUN sed -i '1s;^;include /etc/squid/conf.d/*.conf\n;' /etc/squid/squid.conf && \
# --- --- --- --- --- --- --- --- ---
FROM alpine:3.19.1
FROM alpine:3.22.0
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
ENV TZ Europe/Moscow
@@ -119,13 +119,16 @@ RUN apk add --no-cache \
libstdc++ \
heimdal-libs \
libcap \
libltdl
libltdl \
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 /
RUN install -d -o squid -g squid \
/var/cache/squid \
@@ -138,14 +141,9 @@ RUN install -d -o squid -g squid \
touch /etc/squid/conf.d/placeholder.conf
COPY squid-log.conf /etc/squid/conf.d.tail/
RUN set -x && \
apk add --no-cache --virtual .tz alpine-conf tzdata && \
/sbin/setup-timezone -z $TZ && \
apk del .tz
VOLUME ["/var/cache/squid"]
EXPOSE 3128/tcp
USER squid
CMD ["sh", "-c", "rm -f /var/run/squid/squid.pid ; /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -z && exec /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -YCd 1"]
CMD ["/run.sh"]

14
run.sh Normal file

@@ -0,0 +1,14 @@
#!/bin/sh
set -x
# force remove pid
if [ -e /var/run/squid/squid.pid ]; then
rm -f /var/run/squid/squid.pid
fi
# init cache
/usr/sbin/squid -f "${SQUID_CONFIG_FILE}" --foreground -z
# run squid
exec /usr/sbin/squid -f "${SQUID_CONFIG_FILE}" --foreground -YCd 1