Hi,
I’m new to docker and to learn a little more I have moved my Pihole full server to a container.
I have got the majority working bar one part - the cron job script that enables and disables blocklists.
Looking at the Pihole Dockerfile
https://github.com/pi-hole/docker-pi-hole/blob/master/Dockerfile
it has an ENTRYPOINT and SHELL.
If I run docker-compose with no commands things work fine. If I add a command as follows into docker-compose.yml things fail. why
command: bash -c 'chmod +x /opt/script/enabledisable_domainlist.sh && crontab /opt/script/cron.txt'
Notice the command column - without the compose command I get.
/opt/docker$ docker container ls
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
5a025c019741 pihole/pihole:latest "/s6-init" 51 seconds ago Up 48 seconds (healthy) 0.0.0.0:53->53/tcp, :::53->53/tcp, 0.0.0.0:80->80/tcp, :::80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:53->53/udp, :::443->443/tcp, :::53->53/udp, 67/udp pihole
26b7ea02cb98 klutchell/dnscrypt-proxy:latest "dnscrypt-proxy -con…" 53 seconds ago Restarting (255) 15 seconds ago dnscrypt-proxy
with the compose command I get.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6342c0aed9d6ad12459b58ab5b1c43a208b71275a0e25ae9ff413e1cad13ea85 pihole/pihole:latest "/s6-init bash -c 'chmod +x /opt/script/enabledisable_domainlist.sh && crontab /opt/script/cron.txt'" 2 hours ago Restarting (0) 34 seconds ago pihole
f1acfe9fed43b5fd16ec17d54c50bc99f676d4fc75a2cf7381af2479aa1c8395 klutchell/dnscrypt-proxy:latest "dnscrypt-proxy -config /config/dnscrypt-proxy.toml" 2 hours ago Restarting (255) 30 seconds ago dnscrypt-proxy
Is command meant to look like this?
Kind Regards