Docker: Howto run a command in the container?

Hi,

I would like to restart pihole after I updated the custom.list via scp. E.g. execute the command “pihole restartdns” in the container.
But there is no SSH enabled in the Docker image.

One solution is to restart the container but there must be a better way.

Is there any way to run a command non-interactive via SSH?
Something like echo “pihole restartdns” | ssh admin@router “/container/shell 0” does not work non-interactivly.

Thanks for any input,
dksoft

I think Pihole will still need a complete restart of its container. Unless it’s possible just to restart PiHole-FTL

/container/shell 0

Is there any init scripts?