1
0
mirror of https://github.com/b4tman/docker-squid.git synced 2025-07-26 06:03:37 +00:00

91 Commits
v3 ... v4.16

Author SHA1 Message Date
2d2de740db bump squid to 4.16 2021-08-10 10:49:48 +03:00
b68f62c04c Merge pull request #45 from b4tman/dependabot/docker/alpine-3.14.0
Bump alpine from 3.13.5 to 3.14.0
2021-07-01 14:55:32 +03:00
2e3e78056d fix sig verification
keys imported from http://www.squid-cache.org/pgp.asc

from https://sks-keyservers.net :
> This service is deprecated. This means it is no longer maintained, and new HKPS certificates will not be issued. Service reliability should not be expected.
>
> Update 2021-06-21: Due to even more GDPR takedown requests, the DNS records for the pool will no longer be provided at all.
2021-07-01 14:16:57 +03:00
9e6775a422 fix conflict with libretls and libressl 2021-07-01 13:12:33 +03:00
4649add0df bump libressl to 3.3 2021-07-01 12:02:20 +03:00
dependabot[bot]
adc4f54b02 Bump alpine from 3.13.5 to 3.14.0
Bumps alpine from 3.13.5 to 3.14.0.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-07-01 02:00:23 +00:00
da817bec0d Revert "disable (temp) multiarch"
This reverts commit 82d495d681.
2021-06-10 20:13:01 +03:00
20bcc3ca7d remove dockerhub-description action 2021-06-10 20:12:18 +03:00
93fe767842 fix latest 2021-06-10 20:11:08 +03:00
82d495d681 disable (temp) multiarch 2021-06-10 19:20:54 +03:00
e023bae64b latest tag and tag suffix 2021-06-10 19:19:35 +03:00
024ff445bb fix ci 2021-06-10 19:07:18 +03:00
0dcc835803 Update ci (#44)
* + ghcr.io links

* update ci

* more cache moves

* fix cache move after compose test

* output image

* update description and don't login on PR's

* dependabot: actions
2021-06-10 17:17:50 +03:00
ba0d25813e dockerhub login for build in drone cloud
https://discourse.drone.io/t/how-to-prevent-dockerhub-pull-rate-limit-errors/8324
2021-05-17 17:05:24 +03:00
f1c7c6796f bump squid to 4.15 2021-05-17 16:31:10 +03:00
dependabot[bot]
0e581bd499 Bump alpine from 3.13.4 to 3.13.5
Bumps alpine from 3.13.4 to 3.13.5.

Signed-off-by: dependabot[bot] <support@github.com>
2021-05-01 11:17:41 +03:00
dependabot[bot]
bc32b5d1da Bump alpine from 3.13.2 to 3.13.4
Bumps alpine from 3.13.2 to 3.13.4.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-01 09:04:41 +03:00
dependabot[bot]
7e71d6c43b Bump alpine from 3.13.1 to 3.13.2
Bumps alpine from 3.13.1 to 3.13.2.

Signed-off-by: dependabot[bot] <support@github.com>
2021-03-01 08:59:31 +03:00
3d2e367c14 bump squid to 4.14 2021-02-16 21:02:46 +03:00
f5fbbb9034 fix docker cloud build status url 2021-02-11 21:46:14 +03:00
dependabot[bot]
a56bf2890d Bump alpine from 3.12.3 to 3.13.1
Bumps alpine from 3.12.3 to 3.13.1.

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-29 21:50:01 +03:00
dependabot[bot]
88f5a067fb Bump alpine from 3.12.1 to 3.12.3
Bumps alpine from 3.12.1 to 3.12.3.

Signed-off-by: dependabot[bot] <support@github.com>
2021-01-01 13:03:24 +03:00
dependabot[bot]
b90f70705c Bump alpine from 3.12.0 to 3.12.1
Bumps alpine from 3.12.0 to 3.12.1.

Signed-off-by: dependabot[bot] <support@github.com>
2020-11-01 12:25:08 +03:00
6eb782b5a6 Migrate to GitHub Container Registry
from GitHub Packages
https://docs.github.com/en/free-pro-team@latest/packages/getting-started-with-github-container-registry/migrating-to-github-container-registry-for-docker-images
2020-10-04 22:49:22 +03:00
c3138cec07 Merge pull request #33 from gianluca-mascolo/unittest
Feature: Use squidclient for unit test
2020-10-04 18:04:55 +03:00
gianluca-mascolo
d01a447dcf changed docker-compose version to support start_period 2020-10-04 16:18:04 +02:00
gianluca-mascolo
6486bd001c fix docker-compose version 2020-10-04 11:57:30 +02:00
gianluca-mascolo
212bdefa3b use squidclient for unit test 2020-10-03 17:49:14 +02:00
gianluca-mascolo
824146b6c6 compile install squidclient 2020-10-03 17:46:01 +03:00
bee8e01cb0 bump to 4.13 2020-08-28 14:24:23 +03:00
e36539188f limit make jobs 2020-08-16 16:34:51 +03:00
ebe487186b add drone status badge 2020-08-16 16:31:27 +03:00
6e0968cb97 remove dependabot badge 2020-08-16 16:25:59 +03:00
9aa1dbd893 remove microbadger 2020-08-16 16:25:17 +03:00
1a682a86c9 fix drone secrets for github pkgs 2020-08-16 16:06:05 +03:00
cb78e8c285 fix drone secrets
err:
"Registry credentials or Docker config not provided. Guest mode enabled."
2020-08-16 15:48:10 +03:00
4251447c9d add drone pipeline for arm image (#30)
fix #27
2020-08-16 14:45:13 +03:00
e4ce0fe599 enable kerberos auth (fix #28) 2020-08-13 16:33:27 +03:00
dependabot-preview[bot]
a6b68820a9 Create Dependabot config file 2020-06-18 10:19:54 +03:00
d1e2082f73 bump to 4.12 2020-06-15 14:16:38 +03:00
70ac196b86 libressl 3.1 2020-06-01 11:31:49 +03:00
dependabot-preview[bot]
15cf0f1674 Bump alpine from 3.11.6 to 3.12.0
Bumps alpine from 3.11.6 to 3.12.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-06-01 11:31:49 +03:00
dependabot-preview[bot]
72ef256dfe Bump alpine from 3.11.5 to 3.11.6
Bumps alpine from 3.11.5 to 3.11.6.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-05-01 10:59:33 +03:00
dependabot-preview[bot]
74a4ac3993 Bump alpine from 3.11.3 to 3.11.5
Bumps alpine from 3.11.3 to 3.11.5.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-04-01 09:14:31 +03:00
f709ee39b4 fix dockerimage workflow 2020-02-02 18:55:25 +03:00
a3b428e958 rewrite dockerimage workflow 2020-02-02 18:51:35 +03:00
0ca618e4a0 remove GITHUB_PKGS_LOGIN from secrets 2020-02-02 18:09:50 +03:00
dependabot-preview[bot]
cf301af570 Bump alpine from 3.11.2 to 3.11.3
Bumps alpine from 3.11.2 to 3.11.3.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-02-01 13:31:21 +03:00
483a6c83de bump to 4.10 2020-01-30 11:58:19 +03:00
4e7b30df68 bump to 4.9 2020-01-11 22:12:11 +03:00
dependabot-preview[bot]
6b9adeb25a Bump alpine from 3.10.3 to 3.11.2 (#17)
* Bump alpine from 3.10.3 to 3.11.2

Bumps alpine from 3.10.3 to 3.11.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* libressl 3.0

Co-authored-by: Dmitry Belyaev <b4tman@ya.ru>
2020-01-01 15:46:07 +03:00
dependabot-preview[bot]
63fcfbd66f Bump alpine from 3.10.2 to 3.10.3
Bumps alpine from 3.10.2 to 3.10.3.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-11-01 09:31:15 +03:00
a9785a47bc fix 'docker push' 2019-09-24 16:07:16 +03:00
8394735252 push to GitHub Package Registry (#15)
* push docker image to GitHub

* fix yaml
2019-09-24 15:46:08 +03:00
5092f79c09 add Docker Image CI badge 2019-09-04 11:08:05 +03:00
f49f923a2b add GitHub Action
Docker Image CI via GitHub Actions
2019-09-04 10:50:20 +03:00
bbf973390f add build status 2019-09-02 11:24:11 +03:00
dependabot-preview[bot]
9e3ce9a7e4 Bump alpine from 3.10.1 to 3.10.2
Bumps alpine from 3.10.1 to 3.10.2.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-09-01 13:43:56 +03:00
b15fe81ac6 disable cache_log (duplicated to stdout) 2019-08-11 13:03:36 +03:00
e2bc962b39 Append prepend conf.d (#11)
impl #10

* separete conf.d folders

conf.d - for prepend
conf.d.tail - for append
2019-08-11 12:58:17 +03:00
e513e356c7 bump to 4.8 2019-08-06 13:47:40 +03:00
af1abd0039 add autotest compose file 2019-08-06 13:45:42 +03:00
dependabot-preview[bot]
b462213727 Bump alpine from 3.10.0 to 3.10.1
Bumps alpine from 3.10.0 to 3.10.1.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-08-01 11:46:53 +03:00
dependabot-preview[bot]
d1a9592a3f Bump alpine from 3.9.4 to 3.10.0
Bumps alpine from 3.9.4 to 3.10.0.

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2019-07-05 21:59:14 +03:00
127d9c258c add ssl-bump Dockerfile 2019-06-04 12:29:11 +03:00
88f5272b9e bump to 4.7 2019-06-04 11:54:44 +03:00
c057771360 Dependabot badge 2019-06-04 11:52:49 +03:00
dependabot-preview[bot]
56930ae938 Bump alpine from 3.8 to 3.9.4
Bumps alpine from 3.8 to 3.9.4.
2019-06-04 11:41:02 +03:00
34910856c7 bump to 4.5 2019-02-06 10:21:32 +03:00
82982b2ac5 Merge branch 'v4' 2018-11-13 15:29:57 +03:00
88a2d623e4 bump alpine to 3.8 2018-11-13 15:18:24 +03:00
7388c631e8 bump to 4.4 2018-11-13 14:37:17 +03:00
06757f1033 bump to 4.2 2018-08-21 14:25:36 +03:00
2398325ccb revoke "LOCK_UN" fix
(commit 7393b0da87)
2018-08-21 14:24:43 +03:00
7ae134af14 bump to 4.1 2018-07-16 14:02:38 +03:00
d26782c0b3 fix URL templates 2018-07-16 14:01:49 +03:00
e4d312e05e bump to 4.0.23 2018-05-15 10:05:55 +03:00
2a8b885fad bump to 4.0.23 2018-02-28 13:14:45 +03:00
9b081c8cec bump alpine to 3.7
(cherry picked from commit 6996f4b15d)
2018-02-28 12:36:54 +03:00
6c614c0f90 fix v4 src url 2018-02-28 12:35:28 +03:00
a3b384fd87 fix build error "Address not available" 2018-02-28 12:22:03 +03:00
6f69039cbb MAINTAINER removed 2018-02-28 12:16:39 +03:00
393e77b80d multi-stage build 2018-02-28 12:14:42 +03:00
fe0e5831e1 update README
(cherry picked from commit 2c8641472e)
2017-09-20 13:54:53 +03:00
bd235e7e19 back to libressl 2017-07-03 13:45:19 +03:00
b42486dc88 bump squid to 4.0.21 2017-07-03 13:42:52 +03:00
8a016f4d1e bump alpine to 3.6 2017-07-03 13:41:13 +03:00
25d8d427fe fix LOCK_UN build error (2) 2017-07-03 13:37:44 +03:00
7393b0da87 fix "LOCK_UN" build error
../../src/base/File.h:54:21: error: 'LOCK_UN' was not declared in this scope
2017-06-07 14:12:20 +03:00
5ea9da0782 update to 4.0.20 2017-06-06 19:42:08 +03:00
d059b7d2cd upd to squid v4.0.19 2017-05-16 11:49:14 +03:00
9 changed files with 344 additions and 26 deletions

37
.drone.yml Normal file

@@ -0,0 +1,37 @@
---
kind: pipeline
type: docker
name: arm32 images
platform:
os: linux
arch: arm
steps:
- name: squid image for dockerhub
image: plugins/docker
settings:
repo: docker.io/b4tman/squid
auto_tag: true
auto_tag_suffix: armhf
pull_image: true
registry: docker.io
username: b4tman
password:
from_secret: docker_password
config:
from_secret: docker_config
- name: squid-armhf image for github packages
image: plugins/docker
settings:
repo: ghcr.io/b4tman/squid-armhf
auto_tag: true
pull_image: true
registry: ghcr.io
username: b4tman
password:
from_secret: github_password
config:
from_secret: docker_config
trigger:
ref:
- refs/tags/**
- refs/heads/master

14
.github/dependabot.yml vendored Normal file

@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/"
schedule:
interval: monthly
time: "02:00"
open-pull-requests-limit: 10
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: monthly
time: "03:00"

217
.github/workflows/dockerimage.yml vendored Normal file

@@ -0,0 +1,217 @@
name: Docker Image CI
on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for PRs to `master` branch.
pull_request:
branches:
- "master"
jobs:
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: b4tman
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build squid image
uses: docker/build-push-action@v2
with:
context: .
push: false
tags: b4tman/squid
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
outputs: type=image,name=b4tman/squid,push=false
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Test image
run: docker-compose -f docker-compose.test.yml up sut
- name: Build 'ssl-bump' image
uses: docker/build-push-action@v2
with:
context: ssl-bump
push: false
file: ssl-bump/Dockerfile
tags: b4tman/squid:ssl-bump
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
push:
needs: test
runs-on: ubuntu-20.04
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
b4tman/squid
ghcr.io/b4tman/squid
flavor: |
latest=${{ github.ref == 'refs/heads/master' }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Docker meta (ssl-bump)
id: meta_ssl_bump
uses: docker/metadata-action@v3
with:
images: |
b4tman/squid
ghcr.io/b4tman/squid
flavor: |
latest=false
suffix=-ssl-bump
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Docker meta (ssl-bump ghcr)
id: meta_ssl_bump_ghcr
uses: docker/metadata-action@v3
with:
images: |
ghcr.io/b4tman/squid-ssl-bump
flavor: |
latest=${{ github.ref == 'refs/heads/master' }}
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: b4tman
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Login to GHCR
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build squid image
uses: docker/build-push-action@v2
with:
context: .
push: true
platforms: linux/amd64,linux/arm/v7
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Build 'ssl-bump' image
uses: docker/build-push-action@v2
with:
context: ssl-bump
push: true
file: ssl-bump/Dockerfile
platforms: linux/amd64,linux/arm/v7
tags: ${{ steps.meta_ssl_bump.outputs.tags }}
labels: ${{ steps.meta_ssl_bump.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
- name: Build 'ssl-bump' image for ghcr
uses: docker/build-push-action@v2
with:
context: ssl-bump
push: true
file: ssl-bump/Dockerfile
platforms: linux/amd64,linux/arm/v7
tags: ${{ steps.meta_ssl_bump_ghcr.outputs.tags }}
labels: ${{ steps.meta_ssl_bump_ghcr.outputs.labels }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache

@@ -1,7 +1,11 @@
FROM alpine:3.8 as build
FROM alpine:3.14.0 as build
ENV SQUID_VER 3.5.28
ENV SQUID_SIG_KEY EA31CC5E9488E5168D2DCC5EB268E706FF5CF463
ENV SQUID_VER 4.16
# fix conflict with libretls and libressl
RUN set -x && \
apk add --no-cache libretls && \
apk upgrade --no-cache libretls
RUN set -x && \
apk add --no-cache \
@@ -24,17 +28,15 @@ RUN set -x && \
RUN set -x && \
mkdir -p /tmp/build && \
cd /tmp/build && \
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%.*.*}/${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_VER%.*}/squid-${SQUID_VER}.tar.gz.asc -o squid-${SQUID_VER}.tar.gz.asc
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
COPY squid-keys.asc /tmp
RUN set -x && \
cd /tmp/build && \
export GNUPGHOME="$(mktemp -d)" && \
( \
gpg --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys ${SQUID_SIG_KEY} || \
gpg --keyserver hkp://ipv4.pool.sks-keyservers.net --recv-keys ${SQUID_SIG_KEY} || \
gpg --keyserver hkp://pgp.mit.edu:80 --recv-keys ${SQUID_SIG_KEY} \
) && \
gpg --import /tmp/squid-keys.asc && \
gpg --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
rm -rf "$GNUPGHOME"
@@ -63,7 +65,7 @@ RUN set -x && \
--enable-epoll \
--enable-external-acl-helpers="file_userip,unix_group,wbinfo_group" \
--enable-auth-ntlm="fake" \
--enable-auth-negotiate="wrapper" \
--enable-auth-negotiate="kerberos,wrapper" \
--enable-silent-rules \
--disable-mit \
--enable-heimdal \
@@ -71,6 +73,7 @@ RUN set -x && \
--enable-arp-acl \
--enable-openssl \
--enable-ssl-crtd \
--enable-security-cert-generators="file" \
--enable-ident-lookups \
--enable-useragent-log \
--enable-cache-digests \
@@ -92,12 +95,18 @@ RUN set -x && \
--with-openssl \
--with-pidfile=/var/run/squid/squid.pid
RUN set -x && \
cd /tmp/build && \
make -j $(grep -cs ^processor /proc/cpuinfo) && \
make install
nproc=$(n=$(nproc) ; max_n=6 ; [ $n -le $max_n ] && echo $n || echo $max_n) && \
make -j $nproc && \
make install && \
cd tools/squidclient && make && make install-strip
FROM alpine:3.8
RUN sed -i '1s;^;include /etc/squid/conf.d/*.conf\n;' /etc/squid/squid.conf
RUN echo 'include /etc/squid/conf.d.tail/*.conf' >> /etc/squid/squid.conf
FROM alpine:3.14.0
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
ENV TZ Europe/Moscow
@@ -106,18 +115,25 @@ RUN set -x && \
deluser squid 2>/dev/null; delgroup squid 2>/dev/null; \
addgroup -S squid -g 3128 && adduser -S -u 3128 -G squid -g squid -H -D -s /bin/false -h /var/cache/squid squid
# fix conflict with libretls and libressl
RUN set -x && \
apk add --no-cache libretls && \
apk upgrade --no-cache libretls
RUN apk add --no-cache \
libstdc++ \
heimdal-libs \
libcap \
libressl2.7-libcrypto \
libressl2.7-libssl \
libressl3.3-libcrypto \
libressl3.3-libssl \
libltdl
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
RUN install -d -o squid -g squid \
/var/cache/squid \
@@ -125,9 +141,11 @@ RUN install -d -o squid -g squid \
/var/run/squid && \
chmod +x /usr/lib/squid/*
RUN echo 'include /etc/squid/conf.d/*.conf' >> "$SQUID_CONFIG_FILE" && \
install -d -m 755 -o squid -g squid /etc/squid/conf.d
COPY squid-log.conf /etc/squid/conf.d/
RUN install -d -m 755 -o squid -g squid \
/etc/squid/conf.d \
/etc/squid/conf.d.tail
RUN 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 && \
@@ -139,4 +157,4 @@ EXPOSE 3128/tcp
USER squid
CMD ["sh", "-c", "/usr/sbin/squid -f ${SQUID_CONFIG_FILE} -z && exec /usr/sbin/squid -f ${SQUID_CONFIG_FILE} -NYCd 1"]
CMD ["sh", "-c", "/usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -z && exec /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -YCd 1"]

@@ -1,10 +1,19 @@
[![](https://images.microbadger.com/badges/image/b4tman/squid.svg)](https://microbadger.com/images/b4tman/squid "Get your own image badge on microbadger.com")
[![Drone Build Status](https://cloud.drone.io/api/badges/b4tman/docker-squid/status.svg?ref=refs/heads/master)](https://cloud.drone.io/b4tman/docker-squid)
![Docker Build Status](https://img.shields.io/docker/cloud/build/b4tman/squid)
![Docker Image CI Status](https://github.com/b4tman/docker-squid/workflows/Docker%20Image%20CI/badge.svg)
# docker-squid
Docker Squid container based on Alpine Linux.
Automated builds of the image are available on [Dockerhub](https://hub.docker.com/r/b4tman/squid).
Automated builds of the image are available on:
- DockerHub:
- [b4tman/squid](https://hub.docker.com/r/b4tman/squid)
- Github:
- [ghcr.io/b4tman/squid](https://github.com/users/b4tman/packages/container/package/squid)
- [ghcr.io/b4tman/squid-armhf](https://github.com/users/b4tman/packages/container/package/squid-armhf)
- [ghcr.io/b4tman/squid-ssl-bump](https://github.com/users/b4tman/packages/container/package/squid-ssl-bump)
# Quick Start
@@ -27,7 +36,6 @@ docker-compose up
- **SQUID_CONFIG_FILE**: Specify the configuration file for squid. Defaults to `/etc/squid/squid.conf`.
## Example:
```bash
@@ -37,4 +45,4 @@ docker run -p 3128:3128 \
b4tman/squid
```
This will start a squid container with your config file `/srv/docker/squid/squid.conf`.
This will start a squid container with your config file `/srv/docker/squid/squid.conf`.

20
docker-compose.test.yml Normal file

@@ -0,0 +1,20 @@
version: '2.3'
services:
proxy:
image: squidproxy
build:
context: .
dockerfile: Dockerfile
healthcheck:
test: ["CMD", "sh", "-exc", "squidclient -T 3 mgr:info 2> /dev/null | grep -qF '200 OK'"]
interval: 5s
timeout: 3s
retries: 5
start_period: 1s
sut:
image: squidproxy
links:
- 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'"

BIN
squid-keys.asc Normal file

Binary file not shown.

@@ -1,4 +1,4 @@
logfile_rotate 0
cache_store_log none
access_log stdio:/proc/self/fd/1
cache_log stdio:/proc/self/fd/2
cache_log /dev/null

4
ssl-bump/Dockerfile Normal file

@@ -0,0 +1,4 @@
FROM b4tman/squid
USER root
CMD ["sh", "-c", "(test -d /var/cache/squid/ssl_db || /usr/lib/squid/security_file_certgen -c -s /var/cache/squid/ssl_db -M 4MB) && /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -z && exec /usr/sbin/squid -f ${SQUID_CONFIG_FILE} --foreground -YCd 1"]