forked from sameersbn/docker-squid
-
Notifications
You must be signed in to change notification settings - Fork 1
Using podman instead
Steve Brasier edited this page Jan 3, 2023
·
8 revisions
On Rocky Linux 8.5, equivalent of quickstart is:
# yum install -y podman
# mkdir -p /srv/podman/squid/{log,cache}
# chcon -Rt svirt_sandbox_file_t !$
# podman run --name squid --replace -d --restart=always --publish 3128:3128 --volume /srv/podman/squid/log:/var/log/ --volume /srv/podman/squid/cache:/var/spool/ stackhpc/squid:4.15
NB: If the host's network MTU is smaller than podman's default of 1500 (e.g. some smslabs at 1442) then you can either insert:
-
--network host
- use host networking -
--network slirp4netns:mtu=MTU
to set MTU for default rootless user network stack.
If you already have networking up you will need to stop all containers using it and then run podman network prune
.
If the node running squid did not shut down gracefully, rerunning the podman run
command will probably fail like this:
# problem
Error: error creating container storage: the container name "squid" is already in use by "656e0a81bb466aae3d5422e18c0a007decf4bea34321c09c26f09a88a105e14a". You have to remove that container to be able to reuse that name.: that name is already in use
# solution
podman rm -f 656e0a81bb466aae3d5422e18c0a007decf4bea34321c09c26f09a88a105e14a