mirror of
https://github.com/b4tman/docker-squid.git
synced 2026-02-05 14:35:02 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
bb5513fac9
|
|||
|
20ef8cf8be
|
|||
|
aabc247a2b
|
|||
|
9f6c88ad96
|
|||
|
b5e86101ef
|
|||
|
63c7ba99e9
|
|||
|
7ac8996e39
|
|||
|
d92da9a79d
|
|||
|
11434c9296
|
|||
|
9e51552e39
|
|||
|
2c911aad44
|
|||
|
2c8641472e
|
|||
|
be6513f835
|
|||
|
f2f586f586
|
|||
|
382a181d1a
|
|||
|
a68a4dc255
|
|||
|
6f612170e6
|
|||
| 876c6f0678 | |||
| f384c90781 | |||
| 266a711b36 | |||
| 7f55a91c1d | |||
| 247d11d625 |
33
.drone.yml
33
.drone.yml
@@ -1,33 +0,0 @@
|
|||||||
---
|
|
||||||
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
|
|
||||||
- name: squid-armhf image for github packages
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
repo: docker.pkg.github.com/b4tman/docker-squid/squid-armhf
|
|
||||||
auto_tag: true
|
|
||||||
pull_image: true
|
|
||||||
registry: docker.pkg.github.com
|
|
||||||
username: b4tman
|
|
||||||
password:
|
|
||||||
from_secret: github_password
|
|
||||||
trigger:
|
|
||||||
ref:
|
|
||||||
- refs/tags/**
|
|
||||||
- refs/heads/master
|
|
||||||
83
.github/workflows/dockerimage.yml
vendored
83
.github/workflows/dockerimage.yml
vendored
@@ -1,83 +0,0 @@
|
|||||||
name: Docker Image CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
# Publish `master` as Docker `latest` image.
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
# Publish `v1.2.3` tags as releases.
|
|
||||||
tags:
|
|
||||||
- v*
|
|
||||||
|
|
||||||
# Run tests for any PRs.
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
test:
|
|
||||||
runs-on: ubuntu-18.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
|
|
||||||
|
|
||||||
push:
|
|
||||||
needs: test
|
|
||||||
runs-on: ubuntu-18.04
|
|
||||||
if: github.event_name == 'push'
|
|
||||||
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.GITHUB_PKGS_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Push squid image
|
|
||||||
run: |
|
|
||||||
IMAGE_ID=docker.pkg.github.com/${{ github.repository }}/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=docker.pkg.github.com/${{ github.repository }}/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
|
|
||||||
11
Dockerfile
11
Dockerfile
@@ -1,6 +1,6 @@
|
|||||||
FROM alpine:3.12.0 as build
|
FROM --platform=linux/armhf alpine:3.12.0 as build
|
||||||
|
|
||||||
ENV SQUID_VER 4.13
|
ENV SQUID_VER 4.12
|
||||||
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
|
ENV SQUID_SIG_KEY B06884EDB779C89B044E64E3CD6DBF8EF3B17D3E
|
||||||
|
|
||||||
RUN set -x && \
|
RUN set -x && \
|
||||||
@@ -63,7 +63,7 @@ RUN set -x && \
|
|||||||
--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="kerberos,wrapper" \
|
--enable-auth-negotiate="wrapper" \
|
||||||
--enable-silent-rules \
|
--enable-silent-rules \
|
||||||
--disable-mit \
|
--disable-mit \
|
||||||
--enable-heimdal \
|
--enable-heimdal \
|
||||||
@@ -95,14 +95,13 @@ RUN set -x && \
|
|||||||
|
|
||||||
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) && \
|
make -j $(grep -cs ^processor /proc/cpuinfo) && \
|
||||||
make -j $nproc && \
|
|
||||||
make install
|
make install
|
||||||
|
|
||||||
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 --platform=linux/armhf alpine:3.12.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
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
[](https://cloud.drone.io/b4tman/docker-squid)
|
[](https://microbadger.com/images/b4tman/squid:armhf "Get your own image badge on microbadger.com")
|
||||||
|
[](https://dependabot.com)
|
||||||

|

|
||||||

|

|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
version: '2'
|
version: '2'
|
||||||
services:
|
services:
|
||||||
squid:
|
squid:
|
||||||
image: 'b4tman/squid'
|
image: 'b4tman/squid:armhf'
|
||||||
container_name: 'my-squid'
|
container_name: 'my-squid'
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM b4tman/squid
|
FROM b4tman/squid:armhf
|
||||||
|
|
||||||
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