1
0
mirror of https://github.com/b4tman/docker-squid.git synced 2025-07-23 04:43:27 +00:00

29 Commits

Author SHA1 Message Date
b1a8f65fe3 bump squid to 5.2 2021-10-04 10:54:23 +03:00
02094e50e2 Create stale.yml 2021-10-04 10:08:52 +03:00
411b922800 remove alpine 3.14.0 libretls fix 2021-09-01 10:14:07 +03:00
dependabot[bot]
92cf56c414 Bump alpine from 3.14.0 to 3.14.2
Bumps alpine from 3.14.0 to 3.14.2.

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 10:14:07 +03:00
029f8e55aa Merge pull request #21 from b4tman/v5
v5.1
2021-08-10 12:44:07 +03:00
3895aba33e Merge branch 'master' into v5 2021-08-10 12:19:06 +03:00
685eeddf3e bump squid to 5.1 2021-08-10 11:33:29 +03:00
1075790c45 fix build dirs 2021-08-10 11:28:21 +03:00
2d2de740db bump squid to 4.16 2021-08-10 10:49:48 +03:00
9d7abf3dea bump to 5.0.7 2021-08-10 10:41:20 +03:00
3ce1d078b7 Merge branch 'master' into v5
# Conflicts:
#	Dockerfile
2021-08-10 10:38:56 +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
ab6974f7b7 bump squid to 5.0.1 2020-02-02 19:26:12 +03:00
7 changed files with 269 additions and 90 deletions

@@ -17,6 +17,8 @@ steps:
username: b4tman
password:
from_secret: docker_password
config:
from_secret: docker_config
- name: squid-armhf image for github packages
image: plugins/docker
settings:
@@ -27,6 +29,8 @@ steps:
username: b4tman
password:
from_secret: github_password
config:
from_secret: docker_config
trigger:
ref:
- refs/tags/**

@@ -1,8 +1,14 @@
version: 2
updates:
- package-ecosystem: docker
directory: "/"
schedule:
interval: monthly
time: '02:00'
open-pull-requests-limit: 10
- 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"

@@ -5,79 +5,213 @@ on:
# Publish `master` as Docker `latest` image.
branches:
- master
# Publish `v1.2.3` tags as releases.
tags:
- v*
# Run tests for any PRs.
# Run tests for PRs to `master` branch.
pull_request:
branches:
- "master"
jobs:
test:
runs-on: ubuntu-18.04
test:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Build squid image
run: docker build . --file Dockerfile --tag b4tman/squid
- name: Test image
run: docker-compose -f docker-compose.test.yml up sut
- name: Build 'ssl-bump' image
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
- 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-18.04
if: github.event_name == 'push'
runs-on: ubuntu-20.04
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Build squid image
run: docker build . --file Dockerfile --tag b4tman/squid
- name: Build 'ssl-bump' image
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
- name: Log into registry
run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push squid image
run: |
IMAGE_ID=ghcr.io/${{ github.actor }}/squid
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag b4tman/squid $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- name: Push 'ssl-bump' image
run: |
IMAGE_ID=ghcr.io/${{ github.actor }}/squid-ssl-bump
# Strip git ref prefix from version
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag b4tman/squid:ssl-bump $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
- 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

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@v3
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.'

@@ -1,7 +1,6 @@
FROM alpine:3.13.1 as build
FROM alpine:3.14.2 as build
ENV SQUID_VER 4.14
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
ENV SQUID_VER 5.2
RUN set -x && \
apk add --no-cache \
@@ -26,15 +25,13 @@ RUN set -x && \
cd /tmp/build && \
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"
@@ -93,6 +90,10 @@ RUN set -x && \
--with-openssl \
--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 && \
cd /tmp/build && \
@@ -104,7 +105,7 @@ RUN set -x && \
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.13.1
FROM alpine:3.14.2
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
ENV TZ Europe/Moscow
@@ -117,8 +118,8 @@ RUN apk add --no-cache \
libstdc++ \
heimdal-libs \
libcap \
libressl3.1-libcrypto \
libressl3.1-libssl \
libressl3.3-libcrypto \
libressl3.3-libssl \
libltdl
COPY --from=build /etc/squid/ /etc/squid/

@@ -1,12 +1,19 @@
[![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)
[![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
@@ -29,7 +36,6 @@ docker-compose up
- **SQUID_CONFIG_FILE**: Specify the configuration file for squid. Defaults to `/etc/squid/squid.conf`.
## Example:
```bash
@@ -39,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`.

BIN
squid-keys.asc Normal file

Binary file not shown.