Community discussions

MikroTik App
dksoft
Member Candidate
Member Candidate
Topic Author
Posts: 141
加入: Thu Dec 06, 2012 8:56 am
Location:Germany

Docker: Howto run a command in the container?

Mon Nov 14, 2022 1:25 pm

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
Top
elbob2002
Member Candidate
Member Candidate
Posts: 228
加入: Tue May 15, 2018 8:15 pm
Location:Ireland

Re: Docker: Howto run a command in the container?

Mon Nov 14, 2022 10:58 pm

I think Pihole will still need a complete restart of its container. Unless it's possible just to restart PiHole-FTL
Code:Select all
/container/shell 0
Is there any init scripts?
Top

Who is online

Users browsing this forum: No registered users and 3 guests