1. docker hub : https://hub.docker.com/r/minimum2scp/squid/

    下载可以直接使用 命令如下:

docker run --name squid --rm -p 3128:3128 minimum2scp/squid 该镜像比较大 大概 200M 左右

  1. docker : https://hub.docker.com/r/sameersbn/squid/
docker run --name squid --rm -p 3128:3128 sameersbn/squid
docker cp squid:/etc/squid/ /etc/squid/
docker run --name squid -d --restart always -v /etc/squid:/etc/squid -p 3128:3128 sameersbn/squid

该镜像比较纯洁: 66M, 但是该镜像需要修改 /etc/squid/squid.conf 的配置文件, 否则请求为 403 ! 没有权限访问! 简单的 copy 签名镜像的文件即可!内容如下:

#
http_port 3128
#
acl localnet src 10.0.0.0/8    # RFC1918 possible internal network
acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
acl localnet src 192.168.0.0/16        # RFC1918 possible internal network
acl localnet src fc00::/7       # RFC 4193 local private network range
acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines

http_access allow localnet

(完)