stecog
stecog

Reputation: 2344

Run command to docker container in a script

I need run command to docker container in a script, i trying with:

docker run -it <container> /bin/bash -c "command"

I had no error but the command is not executed

Upvotes: 6

Views: 4309

Answers (1)

lifus
lifus

Reputation: 8482

I can not create a new image, i must not stop the service ... I do it manually

It's possible to invoke a command in a running container:

docker exec <container_id> rm -f /tmp/cache/*/*/*

Upvotes: 3

Related Questions