sameersbn / docker-squid

Dockerfile to create a Docker container image for Squid proxy server
MIT License
822 stars 412 forks source link

There does not seem to be a user squid #15

Open t94j0 opened 8 years ago

t94j0 commented 8 years ago

Hello, I am trying to use docker-squid, but I am running into some issues. I have a custom squid.conf, so I am using the run command:

docker run --name squid-cache -d --restart=always --publish 3128:3128 --volume /opt/squid-proxy/logs:/var/log/squid3 --volume /opt/squid-proxy/squid3/squid.conf:/etc/squid3/squid.conf sameersbn/squid:3.3.8-14

But I am getting this error:

Initializing cache...
FATAL: getpwnam failed to find userid for effective user 'squid'
Squid Cache (Version 3.3.8): Terminated abnormally.
CPU Usage: 0.014 seconds = 0.007 user + 0.007 sys
Maximum Resident Size: 24912 KB
Page faults with physical i/o: 0

I think that means that there is no user named squid, but I'm not 100% sure, so I came here for help.

kevkha commented 8 years ago

Is your custom squid.conf from here https://github.com/sameersbn/docker-squid/blob/master/squid.conf?

sameersbn commented 8 years ago

The default user created for squid is proxy. update your squid.conf and update the cache_effective_user to proxy.

It is generally a good idea to base your squid configuration on the sample squid.conf file present in the repo.

sameersbn commented 8 years ago

Is your custom squid.conf from here https://github.com/sameersbn/docker-squid/blob/master/squid.conf?

yes. https://github.com/sameersbn/docker-squid/blob/master/Dockerfile#L16