mirror of
https://github.com/b4tman/docker-squid.git
synced 2025-11-09 21:48:25 +00:00
Compare commits
45 Commits
v5_sub
...
v4.16-arm6
| Author | SHA1 | Date | |
|---|---|---|---|
|
cf4b3f4845
|
|||
| 2d2de740db | |||
| 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 | |||
|
|
a6b68820a9 | ||
| d1e2082f73 | |||
| 70ac196b86 | |||
|
|
15cf0f1674 | ||
|
|
72ef256dfe | ||
|
|
74a4ac3993 |
37
.drone.yml
Normal file
37
.drone.yml
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: docker
|
||||||
|
name: arm64 images
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
steps:
|
||||||
|
- name: squid image for dockerhub
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: docker.io/b4tman/squid
|
||||||
|
auto_tag: true
|
||||||
|
auto_tag_suffix: arm64
|
||||||
|
pull_image: true
|
||||||
|
registry: docker.io
|
||||||
|
username: b4tman
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
config:
|
||||||
|
from_secret: docker_config
|
||||||
|
- name: squid-arm64 image for github packages
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
repo: ghcr.io/b4tman/squid-arm64
|
||||||
|
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
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"
|
||||||
282
.github/workflows/dockerimage.yml
vendored
282
.github/workflows/dockerimage.yml
vendored
@@ -5,93 +5,213 @@ on:
|
|||||||
# Publish `master` as Docker `latest` image.
|
# Publish `master` as Docker `latest` image.
|
||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
# 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: Checkout submodules
|
- name: Set up QEMU
|
||||||
shell: bash
|
uses: docker/setup-qemu-action@v1
|
||||||
run: |
|
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
- name: Set up Docker Buildx
|
||||||
git submodule sync --recursive
|
uses: docker/setup-buildx-action@v1
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
|
||||||
|
- name: Login to DockerHub
|
||||||
- name: Build squid image
|
if: github.event_name != 'pull_request'
|
||||||
run: docker build . --file Dockerfile --tag b4tman/squid
|
uses: docker/login-action@v1
|
||||||
|
with:
|
||||||
- name: Test image
|
username: b4tman
|
||||||
run: docker-compose -f docker-compose.test.yml up sut
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Build 'ssl-bump' image
|
- name: Cache Docker layers
|
||||||
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
|
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: Checkout submodules
|
- name: Docker meta
|
||||||
shell: bash
|
id: meta
|
||||||
run: |
|
uses: docker/metadata-action@v3
|
||||||
auth_header="$(git config --local --get http.https://github.com/.extraheader)"
|
with:
|
||||||
git submodule sync --recursive
|
images: |
|
||||||
git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1
|
b4tman/squid
|
||||||
|
ghcr.io/b4tman/squid
|
||||||
- name: Build squid image
|
flavor: |
|
||||||
run: docker build . --file Dockerfile --tag b4tman/squid
|
latest=${{ github.ref == 'refs/heads/master' }}
|
||||||
|
tags: |
|
||||||
- name: Build 'ssl-bump' image
|
type=ref,event=branch
|
||||||
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
|
type=semver,pattern={{version}}
|
||||||
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
- name: Log into registry
|
|
||||||
run: echo "${{ secrets.GITHUB_PKGS_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
- name: Docker meta (ssl-bump)
|
||||||
|
id: meta_ssl_bump
|
||||||
- name: Push squid image
|
uses: docker/metadata-action@v3
|
||||||
run: |
|
with:
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/squid
|
images: |
|
||||||
|
b4tman/squid
|
||||||
# Strip git ref prefix from version
|
ghcr.io/b4tman/squid
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
flavor: |
|
||||||
|
latest=false
|
||||||
# Strip "v" prefix from tag name
|
suffix=-ssl-bump
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
# Use Docker `latest` tag convention
|
type=semver,pattern={{version}}
|
||||||
[ "$VERSION" == "master" ] && VERSION=latest
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
- name: Docker meta (ssl-bump ghcr)
|
||||||
echo VERSION=$VERSION
|
id: meta_ssl_bump_ghcr
|
||||||
|
uses: docker/metadata-action@v3
|
||||||
docker tag b4tman/squid $IMAGE_ID:$VERSION
|
with:
|
||||||
docker push $IMAGE_ID:$VERSION
|
images: |
|
||||||
|
ghcr.io/b4tman/squid-ssl-bump
|
||||||
- name: Push 'ssl-bump' image
|
flavor: |
|
||||||
run: |
|
latest=${{ github.ref == 'refs/heads/master' }}
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/ssl-bump
|
tags: |
|
||||||
|
type=ref,event=branch
|
||||||
# Strip git ref prefix from version
|
type=semver,pattern={{version}}
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
# Strip "v" prefix from tag name
|
- name: Set up QEMU
|
||||||
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
uses: docker/setup-qemu-action@v1
|
||||||
|
|
||||||
# Use Docker `latest` tag convention
|
- name: Set up Docker Buildx
|
||||||
[ "$VERSION" == "master" ] && VERSION=latest
|
uses: docker/setup-buildx-action@v1
|
||||||
|
|
||||||
echo IMAGE_ID=$IMAGE_ID
|
- name: Cache Docker layers
|
||||||
echo VERSION=$VERSION
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
docker tag b4tman/squid:ssl-bump $IMAGE_ID:$VERSION
|
path: /tmp/.buildx-cache
|
||||||
docker push $IMAGE_ID:$VERSION
|
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
|
||||||
|
|||||||
4
.gitmodules
vendored
4
.gitmodules
vendored
@@ -1,4 +0,0 @@
|
|||||||
[submodule "squid"]
|
|
||||||
path = squid
|
|
||||||
url = https://github.com/squid-cache/squid
|
|
||||||
branch = v5
|
|
||||||
68
Dockerfile
68
Dockerfile
@@ -1,4 +1,11 @@
|
|||||||
FROM alpine:3.11.3 as build
|
FROM alpine:3.14.0 as build
|
||||||
|
|
||||||
|
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 && \
|
RUN set -x && \
|
||||||
apk add --no-cache \
|
apk add --no-cache \
|
||||||
@@ -18,15 +25,25 @@ RUN set -x && \
|
|||||||
libcap-dev \
|
libcap-dev \
|
||||||
linux-headers
|
linux-headers
|
||||||
|
|
||||||
COPY squid /tmp/build
|
RUN set -x && \
|
||||||
WORKDIR /tmp/build/
|
mkdir -p /tmp/build && \
|
||||||
|
cd /tmp/build && \
|
||||||
RUN sed -i 's/ed -s/ed/g' bootstrap.sh
|
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz -o squid-${SQUID_VER}.tar.gz && \
|
||||||
RUN ln -s /usr/bin/aclocal-1.16 /usr/bin/aclocal-1.15
|
curl -SsL http://www.squid-cache.org/Versions/v${SQUID_VER%%.*}/squid-${SQUID_VER}.tar.gz.asc -o squid-${SQUID_VER}.tar.gz.asc
|
||||||
RUN ln -s /usr/bin/automake-1.16 /usr/bin/automake-1.15
|
|
||||||
RUN sh bootstrap.sh
|
COPY squid-keys.asc /tmp
|
||||||
|
|
||||||
RUN \
|
RUN set -x && \
|
||||||
|
cd /tmp/build && \
|
||||||
|
export GNUPGHOME="$(mktemp -d)" && \
|
||||||
|
gpg --import /tmp/squid-keys.asc && \
|
||||||
|
gpg --batch --verify squid-${SQUID_VER}.tar.gz.asc squid-${SQUID_VER}.tar.gz && \
|
||||||
|
rm -rf "$GNUPGHOME"
|
||||||
|
|
||||||
|
RUN set -x && \
|
||||||
|
cd /tmp/build && \
|
||||||
|
tar --strip 1 -xzf squid-${SQUID_VER}.tar.gz && \
|
||||||
|
\
|
||||||
CFLAGS="-g0 -O2" \
|
CFLAGS="-g0 -O2" \
|
||||||
CXXFLAGS="-g0 -O2" \
|
CXXFLAGS="-g0 -O2" \
|
||||||
LDFLAGS="-s" \
|
LDFLAGS="-s" \
|
||||||
@@ -48,7 +65,7 @@ RUN \
|
|||||||
--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 \
|
||||||
@@ -78,14 +95,18 @@ RUN \
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--with-pidfile=/var/run/squid/squid.pid
|
--with-pidfile=/var/run/squid/squid.pid
|
||||||
|
|
||||||
RUN set -x && \
|
|
||||||
make -j $(grep -cs ^processor /proc/cpuinfo) && \
|
|
||||||
make install
|
|
||||||
|
|
||||||
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.11.3
|
RUN set -x && \
|
||||||
|
cd /tmp/build && \
|
||||||
|
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
|
||||||
|
|
||||||
|
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 SQUID_CONFIG_FILE /etc/squid/squid.conf
|
||||||
ENV TZ Europe/Moscow
|
ENV TZ Europe/Moscow
|
||||||
@@ -94,18 +115,25 @@ 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
|
||||||
|
|
||||||
|
# fix conflict with libretls and libressl
|
||||||
|
RUN set -x && \
|
||||||
|
apk add --no-cache libretls && \
|
||||||
|
apk upgrade --no-cache libretls
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
libstdc++ \
|
libstdc++ \
|
||||||
heimdal-libs \
|
heimdal-libs \
|
||||||
libcap \
|
libcap \
|
||||||
libressl3.0-libcrypto \
|
libressl3.3-libcrypto \
|
||||||
libressl3.0-libssl \
|
libressl3.3-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 \
|
||||||
|
|||||||
17
README.md
17
README.md
@@ -1,13 +1,19 @@
|
|||||||
[](https://microbadger.com/images/b4tman/squid "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
|
||||||
@@ -40,4 +45,4 @@ docker run -p 3128:3128 \
|
|||||||
b4tman/squid
|
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`.
|
||||||
|
|||||||
@@ -1,11 +1,20 @@
|
|||||||
version: '2'
|
version: '2.3'
|
||||||
services:
|
services:
|
||||||
proxy:
|
proxy:
|
||||||
build: .
|
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:
|
sut:
|
||||||
image: alpine:3.10.1
|
image: squidproxy
|
||||||
links:
|
links:
|
||||||
- proxy
|
- proxy
|
||||||
depends_on:
|
depends_on:
|
||||||
- proxy
|
- proxy
|
||||||
command: sh -exc "apk add --update curl && sleep 5 && exec curl --proxy http://proxy:3128 -I http://google.com/"
|
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,4 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
git submodule update --init
|
|
||||||
|
|
||||||
1
squid
1
squid
Submodule squid deleted from f4ade365f8
BIN
squid-keys.asc
Normal file
BIN
squid-keys.asc
Normal file
Binary file not shown.
Reference in New Issue
Block a user