mirror of
https://github.com/b4tman/docker-squid.git
synced 2025-09-06 01:17:33 +00:00
Compare commits
55 Commits
armhf-cros
...
v5.4.0
Author | SHA1 | Date | |
---|---|---|---|
0fd6d1f258 | |||
178974b0df | |||
2eea5bc28f | |||
2ba626f10a | |||
|
f9e3532674 | ||
|
79c4b13210 | ||
b1a8f65fe3 | |||
02094e50e2 | |||
411b922800 | |||
|
92cf56c414 | ||
029f8e55aa | |||
3895aba33e | |||
685eeddf3e
|
|||
1075790c45
|
|||
2d2de740db | |||
9d7abf3dea
|
|||
3ce1d078b7
|
|||
b68f62c04c | |||
2e3e78056d
|
|||
9e6775a422
|
|||
4649add0df
|
|||
|
adc4f54b02 | ||
da817bec0d
|
|||
20bcc3ca7d
|
|||
93fe767842
|
|||
82d495d681
|
|||
e023bae64b
|
|||
024ff445bb
|
|||
0dcc835803 | |||
ba0d25813e
|
|||
f1c7c6796f | |||
|
0e581bd499 | ||
|
bc32b5d1da | ||
|
7e71d6c43b | ||
3d2e367c14 | |||
f5fbbb9034
|
|||
|
a56bf2890d | ||
|
88f5a067fb | ||
|
b90f70705c | ||
6eb782b5a6
|
|||
c3138cec07 | |||
|
d01a447dcf | ||
|
6486bd001c | ||
|
212bdefa3b | ||
|
824146b6c6 | ||
bee8e01cb0 | |||
e36539188f
|
|||
ebe487186b
|
|||
6e0968cb97
|
|||
9aa1dbd893
|
|||
1a682a86c9
|
|||
cb78e8c285
|
|||
4251447c9d | |||
e4ce0fe599 | |||
ab6974f7b7
|
37
.drone.yml
Normal file
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
|
18
.github/dependabot.yml
vendored
18
.github/dependabot.yml
vendored
@@ -1,8 +1,14 @@
|
|||||||
version: 2
|
version: 2
|
||||||
updates:
|
updates:
|
||||||
- package-ecosystem: docker
|
- package-ecosystem: docker
|
||||||
directory: "/"
|
directory: "/"
|
||||||
schedule:
|
schedule:
|
||||||
interval: monthly
|
interval: monthly
|
||||||
time: '02:00'
|
time: "02:00"
|
||||||
open-pull-requests-limit: 10
|
open-pull-requests-limit: 10
|
||||||
|
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: monthly
|
||||||
|
time: "03:00"
|
||||||
|
225
.github/workflows/dockerimage.yml
vendored
225
.github/workflows/dockerimage.yml
vendored
@@ -5,80 +5,213 @@ on:
|
|||||||
# Publish `master` as Docker `latest` image.
|
# Publish `master` as Docker `latest` image.
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
- armhf-cross
|
|
||||||
|
|
||||||
# Publish `v1.2.3` tags as releases.
|
# Publish `v1.2.3` tags as releases.
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
|
|
||||||
# Run tests for any PRs.
|
# Run tests for PRs to `master` branch.
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- "master"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build squid image
|
- name: Set up QEMU
|
||||||
run: docker build . --file Dockerfile --tag b4tman/squid
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
- name: Test image
|
- name: Set up Docker Buildx
|
||||||
run: docker-compose -f docker-compose.test.yml up sut
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
- name: Build 'ssl-bump' image
|
- name: Login to DockerHub
|
||||||
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
|
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:
|
push:
|
||||||
needs: test
|
needs: test
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-20.04
|
||||||
if: github.event_name == 'push'
|
if: github.event_name != 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Build squid image
|
- name: Docker meta
|
||||||
run: docker build . --file Dockerfile --tag b4tman/squid
|
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: Build 'ssl-bump' image
|
- name: Docker meta (ssl-bump)
|
||||||
run: docker build ssl-bump --tag b4tman/squid: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: Log into registry
|
- name: Docker meta (ssl-bump ghcr)
|
||||||
run: echo "${{ secrets.GITHUB_PKGS_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
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: Push squid image
|
- name: Set up QEMU
|
||||||
run: |
|
uses: docker/setup-qemu-action@v1
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/squid
|
|
||||||
|
|
||||||
# Strip git ref prefix from version
|
- name: Set up Docker Buildx
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
# Strip "v" prefix from tag name
|
- name: Cache Docker layers
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: /tmp/.buildx-cache
|
||||||
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-buildx-
|
||||||
|
|
||||||
# Use Docker `latest` tag convention
|
- name: Login to DockerHub
|
||||||
[ "$VERSION" == "master" ] && VERSION=latest
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
username: b4tman
|
||||||
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
- name: Login to GHCR
|
||||||
echo VERSION=$VERSION
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.CR_PAT }}
|
||||||
|
|
||||||
docker tag b4tman/squid $IMAGE_ID:$VERSION
|
- name: Build squid image
|
||||||
docker push $IMAGE_ID:$VERSION
|
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
|
||||||
|
|
||||||
- name: Push 'ssl-bump' image
|
# Temp fix
|
||||||
run: |
|
# https://github.com/docker/build-push-action/issues/252
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/ssl-bump
|
# https://github.com/moby/buildkit/issues/1896
|
||||||
|
- name: Move cache
|
||||||
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
|
|
||||||
# Strip git ref prefix from version
|
- name: Build 'ssl-bump' image
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
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
|
||||||
|
|
||||||
# Strip "v" prefix from tag name
|
# Temp fix
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
# 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
|
||||||
|
|
||||||
# Use Docker `latest` tag convention
|
- name: Build 'ssl-bump' image for ghcr
|
||||||
[ "$VERSION" == "master" ] && VERSION=latest
|
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
|
||||||
|
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
# Temp fix
|
||||||
echo VERSION=$VERSION
|
# https://github.com/docker/build-push-action/issues/252
|
||||||
|
# https://github.com/moby/buildkit/issues/1896
|
||||||
docker tag b4tman/squid:ssl-bump $IMAGE_ID:$VERSION
|
- name: Move cache
|
||||||
docker push $IMAGE_ID:$VERSION
|
run: |
|
||||||
|
rm -rf /tmp/.buildx-cache
|
||||||
|
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||||
|
28
.github/workflows/stale.yml
vendored
Normal file
28
.github/workflows/stale.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
# This workflow warns and then closes issues and PRs that have had no activity for a specified amount of time.
|
||||||
|
#
|
||||||
|
# You can adjust the behavior by modifying this file.
|
||||||
|
# For more information, see:
|
||||||
|
# https://github.com/actions/stale
|
||||||
|
name: Mark stale issues and pull requests
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 1 * * *'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stale:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
permissions:
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v4
|
||||||
|
with:
|
||||||
|
days-before-stale: 182
|
||||||
|
days-before-close: 7
|
||||||
|
stale-issue-message: 'Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days.'
|
||||||
|
close-issue-message: 'Closing due to inactivity.'
|
||||||
|
stale-pr-message: 'Marking stale due to inactivity. Remove stale label or comment or this will be closed in 7 days.'
|
||||||
|
close-pr-message: 'Closing due to inactivity.'
|
45
Dockerfile
45
Dockerfile
@@ -1,9 +1,6 @@
|
|||||||
FROM b4tman/armhf-alpine-qemu:latest as build
|
FROM alpine:3.15.0 as build
|
||||||
|
|
||||||
ENV SQUID_VER 4.12
|
ENV SQUID_VER 5.4
|
||||||
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
|
|
||||||
|
|
||||||
RUN [ "cross-build-start" ]
|
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
@@ -29,14 +26,12 @@ 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 -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 -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 && \
|
RUN set -x && \
|
||||||
cd /tmp/build && \
|
cd /tmp/build && \
|
||||||
export GNUPGHOME="$(mktemp -d)" && \
|
export GNUPGHOME="$(mktemp -d)" && \
|
||||||
( \
|
gpg --import /tmp/squid-keys.asc && \
|
||||||
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 --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
|
gpg --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
|
||||||
rm -rf "$GNUPGHOME"
|
rm -rf "$GNUPGHOME"
|
||||||
|
|
||||||
@@ -61,11 +56,12 @@ RUN set -x && \
|
|||||||
--disable-arch-native \
|
--disable-arch-native \
|
||||||
--enable-removal-policies="lru,heap" \
|
--enable-removal-policies="lru,heap" \
|
||||||
--enable-auth-digest \
|
--enable-auth-digest \
|
||||||
--enable-auth-basic="getpwnam,NCSA" \
|
--enable-auth-basic="getpwnam,NCSA,DB" \
|
||||||
|
--enable-basic-auth-helpers="DB" \
|
||||||
--enable-epoll \
|
--enable-epoll \
|
||||||
--enable-external-acl-helpers="file_userip,unix_group,wbinfo_group" \
|
--enable-external-acl-helpers="file_userip,unix_group,wbinfo_group" \
|
||||||
--enable-auth-ntlm="fake" \
|
--enable-auth-ntlm="fake" \
|
||||||
--enable-auth-negotiate="wrapper" \
|
--enable-auth-negotiate="kerberos,wrapper" \
|
||||||
--enable-silent-rules \
|
--enable-silent-rules \
|
||||||
--disable-mit \
|
--disable-mit \
|
||||||
--enable-heimdal \
|
--enable-heimdal \
|
||||||
@@ -95,23 +91,26 @@ RUN set -x && \
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--with-pidfile=/var/run/squid/squid.pid
|
--with-pidfile=/var/run/squid/squid.pid
|
||||||
|
|
||||||
|
# fix build
|
||||||
|
RUN set -x && \
|
||||||
|
mkdir -p /tmp/build/tools/squidclient/tests && \
|
||||||
|
mkdir -p /tmp/build/tools/tests
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
cd /tmp/build && \
|
cd /tmp/build && \
|
||||||
make -j $(grep -cs ^processor /proc/cpuinfo) && \
|
nproc=$(n=$(nproc) ; max_n=6 ; [ $n -le $max_n ] && echo $n || echo $max_n) && \
|
||||||
make install
|
make -j $nproc && \
|
||||||
|
make install && \
|
||||||
|
cd tools/squidclient && make && make install-strip
|
||||||
|
|
||||||
RUN sed -i '1s;^;include /etc/squid/conf.d/*.conf\n;' /etc/squid/squid.conf
|
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
|
RUN echo 'include /etc/squid/conf.d.tail/*.conf' >> /etc/squid/squid.conf
|
||||||
|
|
||||||
RUN [ "cross-build-end" ]
|
FROM alpine:3.15.0
|
||||||
|
|
||||||
FROM b4tman/armhf-alpine-qemu:latest
|
|
||||||
|
|
||||||
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
|
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
|
||||||
ENV TZ Europe/Moscow
|
ENV TZ Europe/Moscow
|
||||||
|
|
||||||
RUN [ "cross-build-start" ]
|
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
deluser squid 2>/dev/null; delgroup squid 2>/dev/null; \
|
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
|
addgroup -S squid -g 3128 && adduser -S -u 3128 -G squid -g squid -H -D -s /bin/false -h /var/cache/squid squid
|
||||||
@@ -120,14 +119,16 @@ RUN apk add --no-cache \
|
|||||||
libstdc++ \
|
libstdc++ \
|
||||||
heimdal-libs \
|
heimdal-libs \
|
||||||
libcap \
|
libcap \
|
||||||
libressl3.1-libcrypto \
|
libressl3.4-libcrypto \
|
||||||
libressl3.1-libssl \
|
libressl3.4-libssl \
|
||||||
libltdl
|
libltdl
|
||||||
|
|
||||||
COPY --from=build /etc/squid/ /etc/squid/
|
COPY --from=build /etc/squid/ /etc/squid/
|
||||||
COPY --from=build /usr/lib/squid/ /usr/lib/squid/
|
COPY --from=build /usr/lib/squid/ /usr/lib/squid/
|
||||||
COPY --from=build /usr/share/squid/ /usr/share/squid/
|
COPY --from=build /usr/share/squid/ /usr/share/squid/
|
||||||
COPY --from=build /usr/sbin/squid /usr/sbin/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 \
|
RUN install -d -o squid -g squid \
|
||||||
/var/cache/squid \
|
/var/cache/squid \
|
||||||
@@ -146,8 +147,6 @@ RUN set -x && \
|
|||||||
/sbin/setup-timezone -z $TZ && \
|
/sbin/setup-timezone -z $TZ && \
|
||||||
apk del .tz
|
apk del .tz
|
||||||
|
|
||||||
RUN [ "cross-build-end" ]
|
|
||||||
|
|
||||||
VOLUME ["/var/cache/squid"]
|
VOLUME ["/var/cache/squid"]
|
||||||
EXPOSE 3128/tcp
|
EXPOSE 3128/tcp
|
||||||
|
|
||||||
|
15
README.md
15
README.md
@@ -1,13 +1,19 @@
|
|||||||
[](https://microbadger.com/images/b4tman/squid:armhf "Get your own image badge on microbadger.com")
|
[](https://cloud.drone.io/b4tman/docker-squid)
|
||||||
[](https://dependabot.com)
|

|
||||||

|
|
||||||

|

|
||||||
|
|
||||||
# docker-squid
|
# docker-squid
|
||||||
|
|
||||||
Docker Squid container based on Alpine Linux.
|
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
|
# Quick Start
|
||||||
|
|
||||||
@@ -30,7 +36,6 @@ docker-compose up
|
|||||||
|
|
||||||
- **SQUID_CONFIG_FILE**: Specify the configuration file for squid. Defaults to `/etc/squid/squid.conf`.
|
- **SQUID_CONFIG_FILE**: Specify the configuration file for squid. Defaults to `/etc/squid/squid.conf`.
|
||||||
|
|
||||||
|
|
||||||
## Example:
|
## Example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
20
docker-compose.test.yml
Normal file
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'"
|
@@ -1,7 +1,7 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
squid:
|
squid:
|
||||||
image: 'b4tman/squid:armhf-cross'
|
image: 'b4tman/squid'
|
||||||
container_name: 'my-squid'
|
container_name: 'my-squid'
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
|
BIN
squid-keys.asc
Normal file
BIN
squid-keys.asc
Normal file
Binary file not shown.
@@ -1,4 +1,4 @@
|
|||||||
FROM b4tman/squid:armhf-cross
|
FROM b4tman/squid
|
||||||
|
|
||||||
USER root
|
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"]
|
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"]
|
Reference in New Issue
Block a user