Answer the question
In order to leave comments, you need to log in
How to modify docker-compose.yml to run sh script in container after it is up? How to execute cmd command inside container automatically?
Hello. There is a docker-compose.yml file in which the service uses a standard image.
What needs to be done in order to execute a command in cmd inside the container after raising the container, or how to execute the script inside the container in automatic mode after raising it?
It is docker-compose.yml that is used. Dockerfile missing.
Answer the question
In order to leave comments, you need to log in
And what is the difficulty?
docker-compose.yml
...
<какой-то контейнер>:
image: <какой-то стандартный образ>
...
entrypoint: <какая-то команда которую нужно запустить в автоматическом режиме>
...
<какой-то контейнер>:
image: <какой-то стандартный образ>
...
entrypoint: <ваша команда> && <старт стандартной точки входа образа>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question