squid: missing documentation about how to pass squid configuration to the container

Bug #1977586 reported by Andreas Hasenack
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Docker Images
Fix Released
Undecided
Valentin Viennot

Bug Description

Image:
# docker images --no-trunc --quiet ubuntu/squid:latest
sha256:0d35bcb0349b20a964e19417f66d5ee927ae2585b21ff61778bd757327ffcfc6

ubuntu/squid latest 0d35bcb0349b 6 weeks ago 190MB

https://hub.docker.com/r/ubuntu/squid is documenting some options to the container image, namely:

-e TZ=UTC Timezone.
-p 3128:3128 Expose the proxy service
-v /path/to/logs:/var/log/squid Volume to store squid logs
-v /path/to/data:/var/spool/squid Volume to store the squid cache

I think it's missing a line in that table for the main squid configuration file, and config snippets. For example:

-v /path/to/main/config:/etc/squid/squid.conf Main squid configuration file
-v /path/to/config/snippet:/etc/squid/conf.d/snippet.conf Configuration snippets included by squid.conf

For example, the main squid.conf file supplied with the image has no cache_dir directive, which means all the caching is done in memory. In other words, /var/spool/squid stays empty. If you add a config snippet like the one below, then when the container starts, it will also use the disk for caching:

cache_dir diskd /var/spool/squid 10240 16 256

There are many storage types, diskd was just an example, and I agree the container can't make a choice like that. But I think it's important to document how to change the config, and snippets, because very likely someone will want to use storage for cache as well, and then we can give an example in the docs like above.

Related branches

description: updated
description: updated
Changed in ubuntu-docker-images:
assignee: nobody → Sergio Durigan Junior (sergiodj)
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Reassigning to Valentin since this is documentation-related.

Changed in ubuntu-docker-images:
assignee: Sergio Durigan Junior (sergiodj) → Valentin Viennot (valentinviennot)
Revision history for this message
Valentin Viennot (valentinviennot) wrote :

Thanks for this feedback, Andreas.

I've added the changes you proposed to the image documentation.

(And we'll make it easier in the future for you to directly propose changes to these READMEs!)

@sergiodj we should be able to tag as Fix Released / Close.

Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Thanks, Andreas and Valentin. Closing as Fix Released.

Changed in ubuntu-docker-images:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.