This wiki was updated to MediaWiki 1.37. If you notice any issues, please report them to admin[at]


Jump to: navigation, search

openSUSE Squid Container Image


This container image contains the latest squid server from openSUSE Tumbleweed.




The container image comes with a default squid configuration, which does not have a persistent cache. For a persistent cache and a modified configuration file a local data directory is needed. This is by default /srv/squid.

  • /srv/squid contains squid configuration file
  • /srv/squid/cache contains the persistent cache if one is wanted

To adjust the configuration file, get the default squid.conf:

 # mkdir /srv/squid
 # podman run --rm cat /etc/squid/squid.conf > /srv/squid/squid.conf

Persistent cache

To have a persistent cache, get at first the default squid.conf from the container (follow above instruction) and enable the cache_dir option.

Create the disk cache directory:

 # mkdir -p /srv/squid/cache

Add "-v /srv/squid/cache:/var/cache/squid" to PODMAN_SQUID_ARGS in /etc/default/container-squid. If that file does not exist yet, create a new one based on the default values from /usr/etc/default/container-squid:

 # grep ^PODMAN_SQUID_ARGS= /usr/etc/default/container-squid > /etc/default/container-squid
 # vi /etc/default/container-squid

Restart the squid container:

 # systemctl restart container-squid


 # podman run -d --rm -v /srv/squid/squid.conf:/etc/squid/squid.conf:ro -v /srv/squid/cache:/var/cache/squid -p 3128:3128 --name squid

Usage of squid proxy

Configure your web browser settings to use the proxy server which is available at <squid>:3128.

To make the proxy settings available to all applications, adjust /etc/sysconfig/proxy.

Systemd support

The package containers-systemd contains a service file and sysconfig file to configure and automatically start the squid container with systemd.

 # systemctl start container-squid