From 188da40e750ae9b9968bff66404c092e64b91cad Mon Sep 17 00:00:00 2001 From: kev Date: Thu, 14 Oct 2021 11:51:55 +0800 Subject: [PATCH] update squid --- squid/README.md | 24 ++++++++++++++++-------- squid/arm/Dockerfile | 2 +- squid/arm/docker-compose.yml | 18 ++++++++++++------ squid/docker-compose.yml | 18 ++++++++++++------ 4 files changed, 41 insertions(+), 21 deletions(-) diff --git a/squid/README.md b/squid/README.md index a72df7e..c3ae470 100644 --- a/squid/README.md +++ b/squid/README.md @@ -12,24 +12,32 @@ including Windows and is licensed under the GNU GPL. ## docker-compose.yml ```yaml -squid: - image: vimagick/squid - ports: - - "3128:3128/tcp" - - "3130:3130/udp" - restart: unless-stopped +version: "3.8" +services: + squid: + image: vimagick/squid + ports: + - "3128:3128/tcp" + - "3130:3130/udp" + volumes: + - ./data/cache:/var/cache/squid + - ./data/log:/var/log/squid + stop_signal: SIGKILL + restart: unless-stopped ``` -> You can mount `/etc/squid/squid.conf` file. +> You can mount custom config file as `/etc/squid/squid.conf`. ## Up and Running ```bash # server +$ mkdir -p data/{cache,log} +$ chmod -R 777 data $ docker-compose up -d # client -$ curl -x https://127.0.0.1:3128 https://www.google.com/ +$ curl -x 127.0.0.1:3128 ifconfig.co ``` [1]: http://www.squid-cache.org/ diff --git a/squid/arm/Dockerfile b/squid/arm/Dockerfile index 43e344b..96cd08a 100644 --- a/squid/arm/Dockerfile +++ b/squid/arm/Dockerfile @@ -2,7 +2,7 @@ # Dockerfile for squid-arm # -FROM arm32v7/alpine:3 +FROM alpine:3 MAINTAINER EasyPi Software Foundation diff --git a/squid/arm/docker-compose.yml b/squid/arm/docker-compose.yml index 6234e09..54ce0ac 100644 --- a/squid/arm/docker-compose.yml +++ b/squid/arm/docker-compose.yml @@ -1,6 +1,12 @@ -squid: - image: easypi/squid-arm - ports: - - "3128:3128/tcp" - - "3130:3130/udp" - restart: unless-stopped +version: "3.8" +services: + squid: + image: easypi/squid-arm + ports: + - "3128:3128/tcp" + - "3130:3130/udp" + volumes: + - ./data/cache:/var/cache/squid + - ./data/log:/var/log/squid + stop_signal: SIGKILL + restart: unless-stopped diff --git a/squid/docker-compose.yml b/squid/docker-compose.yml index 4eee0fd..53aacfa 100644 --- a/squid/docker-compose.yml +++ b/squid/docker-compose.yml @@ -1,6 +1,12 @@ -squid: - image: vimagick/squid - ports: - - "3128:3128/tcp" - - "3130:3130/udp" - restart: unless-stopped +version: "3.8" +services: + squid: + image: vimagick/squid + ports: + - "3128:3128/tcp" + - "3130:3130/udp" + volumes: + - ./data/cache:/var/cache/squid + - ./data/log:/var/log/squid + stop_signal: SIGKILL + restart: unless-stopped