Run script when enter/attach to running container


I have a container created using docker-compose and every time i enter it i want a script to run automatically.

So, when i run

docker exec -it container_name bash

a script from inside container_name should be executed .

Is this possible ?

Source: Docker Questions

Categorised as containers, docker Tagged ,


Leave a Reply

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us