mirror of
https://github.com/b4tman/docker-squid.git
synced 2025-07-29 15:33:28 +00:00
Compare commits
13 Commits
v6.5.0
...
abfd29ad78
Author | SHA1 | Date | |
---|---|---|---|
abfd29ad78
|
|||
16e644983a
|
|||
33429ba79f | |||
|
05d3fc71a7 | ||
19ecd62b08
|
|||
4eb3c96208
|
|||
|
c1b8ceee1c | ||
|
f504923719 | ||
12abc8228d | |||
|
3ceca4d5f2 | ||
|
0e54ff03de | ||
dd877b801a | |||
|
6db980e029 |
35
.github/workflows/dockerimage.yml
vendored
35
.github/workflows/dockerimage.yml
vendored
@@ -39,7 +39,7 @@ jobs:
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3.3.2
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
@@ -65,13 +65,38 @@ jobs:
|
||||
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
|
||||
|
||||
- name: Test image
|
||||
run: docker compose -f docker-compose.test.yml up --pull never sut
|
||||
run: |
|
||||
set -ex
|
||||
docker compose -f docker-compose.test.yml up --pull never sut --exit-code-from sut
|
||||
docker compose -f docker-compose.test.yml down
|
||||
|
||||
- name: Build 'ssl-bump' image
|
||||
- name: set base image for 'ssl-bump'
|
||||
run: |
|
||||
sed -i "s%FROM b4tman/squid%FROM $TEST_TAG%" ssl-bump/Dockerfile
|
||||
docker build ssl-bump
|
||||
|
||||
- name: Build 'ssl-bump' image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
load: true
|
||||
tags: ${{ env.TEST_TAG }}-ssl-bump
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
|
||||
|
||||
# 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 'ssl-bump' image
|
||||
run: |
|
||||
set -ex
|
||||
TEST_TAG="${TEST_TAG}-ssl-bump" docker compose -f docker-compose.test.yml up --pull never sut --exit-code-from sut
|
||||
docker compose -f docker-compose.test.yml down
|
||||
push:
|
||||
needs: test
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -128,7 +153,7 @@ jobs:
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Cache Docker layers
|
||||
uses: actions/cache@v3.3.2
|
||||
uses: actions/cache@v4.0.0
|
||||
with:
|
||||
path: /tmp/.buildx-cache
|
||||
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
||||
|
2
.github/workflows/stale.yml
vendored
2
.github/workflows/stale.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v8
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
days-before-stale: 182
|
||||
days-before-close: 7
|
||||
|
@@ -1,6 +1,6 @@
|
||||
FROM alpine:3.18.4 as build
|
||||
FROM alpine:3.19.1 as build
|
||||
|
||||
ARG SQUID_VER=6.5
|
||||
ARG SQUID_VER=6.7
|
||||
|
||||
RUN set -x && \
|
||||
apk add --no-cache \
|
||||
@@ -106,7 +106,7 @@ RUN sed -i '1s;^;include /etc/squid/conf.d/*.conf\n;' /etc/squid/squid.conf && \
|
||||
|
||||
# --- --- --- --- --- --- --- --- ---
|
||||
|
||||
FROM alpine:3.18.4
|
||||
FROM alpine:3.19.1
|
||||
|
||||
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
|
||||
ENV TZ Europe/Moscow
|
||||
|
@@ -2,6 +2,8 @@ version: '2.3'
|
||||
services:
|
||||
proxy:
|
||||
image: "${TEST_TAG}"
|
||||
volumes:
|
||||
- './test_localnet.conf:/etc/squid/conf.d/test_localnet.conf:ro'
|
||||
healthcheck:
|
||||
test: ["CMD", "sh", "-exc", "squidclient -T 3 mgr:info 2> /dev/null | grep -qF '200 OK'"]
|
||||
interval: 5s
|
||||
|
BIN
squid-keys.asc
BIN
squid-keys.asc
Binary file not shown.
@@ -1,4 +1,9 @@
|
||||
FROM b4tman/squid
|
||||
|
||||
COPY run.sh /
|
||||
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"]
|
||||
RUN chmod 755 /run.sh
|
||||
|
||||
USER squid
|
||||
|
||||
CMD ["/run.sh"]
|
||||
|
14
ssl-bump/run.sh
Normal file
14
ssl-bump/run.sh
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -x
|
||||
|
||||
# init ssl_db
|
||||
if [ ! -d /var/cache/squid/ssl_db ]; then
|
||||
/usr/lib/squid/security_file_certgen -c -s /var/cache/squid/ssl_db -M 4MB
|
||||
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
|
11
test_localnet.conf
Normal file
11
test_localnet.conf
Normal file
@@ -0,0 +1,11 @@
|
||||
acl localnet1 src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
|
||||
acl localnet1 src 10.0.0.0/8 # RFC 1918 local private network (LAN)
|
||||
acl localnet1 src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
|
||||
acl localnet1 src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
|
||||
acl localnet1 src 172.16.0.0/12 # RFC 1918 local private network (LAN)
|
||||
acl localnet1 src 192.168.0.0/16 # RFC 1918 local private network (LAN)
|
||||
acl localnet1 src fc00::/7 # RFC 4193 local private network range
|
||||
acl localnet1 src fe80::/10 # RFC 4291 link-local (directly plugged) machines
|
||||
|
||||
http_access allow localnet1
|
||||
http_access allow localhost manager
|
Reference in New Issue
Block a user