I need to run Squid inside a Docker container for a project.
Up until now I was using Ubuntu on my Lenovo laptop using this image https://hub.docker.com/r/sameersbn/squid and everything worked just fine.
However, now that I switched to Raspberry Pi 3B+ it doesn’t work anymore because it is only for intel/x86.
I have tried using several different images for my Raspberry but all of them just restart the container over and over again and output different error messages.
Perhaps the best way to try and troubleshoot the issue is to get the logs from the container. If you were to run the following
docker run -d -p 3128:3128 --name squid sk278/squid-armhf
That will create and daemonize a container named “squid”. Once it starts and restarts, you can get the container logs by running
docker logs squid
Which will hopefully provide you with some guidance on where the errors are occurring that are resulting in the container restarts. You can use variants of the ‘docker logs’ command to obtain earlier or more log lines.
You could install an editor (nano, vim) in the container temporarily for testing but the best way is to build a new image based on squid and copy a new file into the image. You can also “bind mount” a the configurationf ile from your host as you can see it in the first post in this topic. Of course you need to copy that file from the container to your host first (or create a new one from scratch)