madharjan / docker-squid

Docker container for Squid
MIT License
1 stars 1 forks source link

Container always exit while run as Transparent Proxy #1

Open fourirakbar opened 6 years ago

fourirakbar commented 6 years ago

Hi madharjan!

I've an issue about run as Transparent Proxy I follow your steps

docker stop squid docker rm squid

docker run -d \ --network=host \ --cap-add=NET_ADMIN \ -e SQUID_HTTP_PORT=9090 \ -e SQUID_INTERCEPT_PORT=9091 \ -e SQUID_CACHE_PEER_HOST=proxyHost \ -e SQUID_CACHE_PEER_PORT=proxyPort \
-e ENABLE_TRANSPARENT_PROXY=1 \ -v /opt/docker/squid/cache:/var/cache/squid3 \ -v /opt/docker/squid/log:/var/log/squid3 \ --name squid \ madharjan/docker-squid:3.3.8

but while I hit enter, and the container directly exit. I check using docker logs, like this: Running /etc/my_init.d/base-startup.sh... Running /etc/my_init.d/squid-startup.sh... FATAL: Bungled /etc/squid3/squid.conf line 7164: cache_peer proxyHost parent proxyPort 0 proxy-only default no-query no-digest no-delay Squid Cache (Version 3.3.8): Terminated abnormally. CPU Usage: 0.004 seconds = 0.000 user + 0.004 sys Maximum Resident Size: 35856 KB Page faults with physical i/o: 0 *** /etc/my_init.d/squid-startup.sh failed with status 1

*** Killing all processes...

madharjan commented 6 years ago

proxyHost, proxyPort are place holders, you are supposed to fill with your actual proxy server settings, the initialization failed as proxyPort is not integer.

You can use https://github.com/jpetazzo/squid-in-a-can

My versions of docker container is an adaptation of above, with unified base image for portability and stability.

On Thu, 19 Apr 2018, 9:08 p.m. Fourir Akbar, notifications@github.com wrote:

Hi madharjan!

I've an issue about run as Transparent Proxy I follow your steps

docker stop squid docker rm squid

docker run -d --network=host --cap-add=NET_ADMIN -e SQUID_HTTP_PORT=9090 -e SQUID_INTERCEPT_PORT=9091 -e SQUID_CACHE_PEER_HOST=proxyHost -e SQUID_CACHE_PEER_PORT=proxyPort \ -e ENABLE_TRANSPARENT_PROXY=1 -v /opt/docker/squid/cache:/var/cache/squid3 -v /opt/docker/squid/log:/var/log/squid3 --name squid madharjan/docker-squid:3.3.8

but while I hit enter, and the container directly exit. I check using docker logs, like this: Running /etc/my_init.d/base-startup.sh... Running /etc/my_init.d/squid-startup.sh... FATAL: Bungled /etc/squid3/squid.conf line 7164: cache_peer proxyHost parent proxyPort 0 proxy-only default no-query no-digest no-delay Squid Cache (Version 3.3.8): Terminated abnormally. CPU Usage: 0.004 seconds = 0.000 user + 0.004 sys Maximum Resident Size: 35856 KB Page faults with physical i/o: 0 *** /etc/my_init.d/squid-startup.sh failed with status 1

*** Killing all processes...

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/madharjan/docker-squid/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAnc84XneiqHLwVMsuLGZOvhT0NTnDV8ks5tqIxJgaJpZM4TbwoJ .