Docker Community Forums

Share and learn in the Docker community.

Automatic command when running bash in a container

Hi All,
During the development, I often use bash to work in a container, using the following command:
docker exec -it my_container bash

I’d like the container to perform a command when bash first runs.
I’ve tried .bash_login, .bash_profile and /etc/profile

Any ideas?
Thanks inadvance