mirror of
https://github.com/b4tman/docker-squid.git
synced 2025-09-27 02:29:07 +00:00
Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
ba0d25813e
|
|||
f1c7c6796f | |||
|
0e581bd499 | ||
|
bc32b5d1da | ||
|
7e71d6c43b | ||
3d2e367c14 | |||
f5fbbb9034
|
|||
|
a56bf2890d | ||
|
88f5a067fb | ||
|
b90f70705c | ||
6eb782b5a6
|
|||
c3138cec07 | |||
|
d01a447dcf | ||
|
6486bd001c | ||
|
212bdefa3b | ||
|
824146b6c6 |
@@ -17,16 +17,20 @@ steps:
|
|||||||
username: b4tman
|
username: b4tman
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
config:
|
||||||
|
from_secret: docker_config
|
||||||
- name: squid-armhf image for github packages
|
- name: squid-armhf image for github packages
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: docker.pkg.github.com/b4tman/docker-squid/squid-armhf
|
repo: ghcr.io/b4tman/squid-armhf
|
||||||
auto_tag: true
|
auto_tag: true
|
||||||
pull_image: true
|
pull_image: true
|
||||||
registry: docker.pkg.github.com
|
registry: ghcr.io
|
||||||
username: b4tman
|
username: b4tman
|
||||||
password:
|
password:
|
||||||
from_secret: github_password
|
from_secret: github_password
|
||||||
|
config:
|
||||||
|
from_secret: docker_config
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
6
.github/workflows/dockerimage.yml
vendored
6
.github/workflows/dockerimage.yml
vendored
@@ -42,11 +42,11 @@ jobs:
|
|||||||
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
|
run: docker build ssl-bump --tag b4tman/squid:ssl-bump
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
run: echo "${{ secrets.GITHUB_PKGS_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.CR_PAT }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Push squid image
|
- name: Push squid image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/squid
|
IMAGE_ID=ghcr.io/${{ github.actor }}/squid
|
||||||
|
|
||||||
# Strip git ref prefix from version
|
# Strip git ref prefix from version
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||||
@@ -65,7 +65,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Push 'ssl-bump' image
|
- name: Push 'ssl-bump' image
|
||||||
run: |
|
run: |
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/ssl-bump
|
IMAGE_ID=ghcr.io/${{ github.actor }}/squid-ssl-bump
|
||||||
|
|
||||||
# Strip git ref prefix from version
|
# Strip git ref prefix from version
|
||||||
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||||
|
12
Dockerfile
12
Dockerfile
@@ -1,6 +1,6 @@
|
|||||||
FROM alpine:3.12.0 as build
|
FROM alpine:3.13.5 as build
|
||||||
|
|
||||||
ENV SQUID_VER 4.13
|
ENV SQUID_VER 4.15
|
||||||
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
|
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
@@ -93,16 +93,18 @@ RUN set -x && \
|
|||||||
--with-openssl \
|
--with-openssl \
|
||||||
--with-pidfile=/var/run/squid/squid.pid
|
--with-pidfile=/var/run/squid/squid.pid
|
||||||
|
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
cd /tmp/build && \
|
cd /tmp/build && \
|
||||||
nproc=$(n=$(nproc) ; max_n=6 ; [ $n -le $max_n ] && echo $n || echo $max_n) && \
|
nproc=$(n=$(nproc) ; max_n=6 ; [ $n -le $max_n ] && echo $n || echo $max_n) && \
|
||||||
make -j $nproc && \
|
make -j $nproc && \
|
||||||
make install
|
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
|
||||||
|
|
||||||
FROM alpine:3.12.0
|
FROM alpine:3.13.5
|
||||||
|
|
||||||
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
|
ENV SQUID_CONFIG_FILE /etc/squid/squid.conf
|
||||||
ENV TZ Europe/Moscow
|
ENV TZ Europe/Moscow
|
||||||
@@ -123,6 +125,8 @@ 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 \
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
[](https://cloud.drone.io/b4tman/docker-squid)
|
[](https://cloud.drone.io/b4tman/docker-squid)
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
# docker-squid
|
# docker-squid
|
||||||
|
@@ -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'"
|
||||||
|
Reference in New Issue
Block a user