I have a docker compose file and in the definition of one of my containers I try to run multiple commands, but when I run two commands one after another, the other command doesn't execute. I tried changing the order between these two commands, and still every time the second command after the && does not run. Does anyone have any idea what this could possibly be?
This is the docker container defenetion in the docker compose file:
django:
container_name: django
restart: unless-stopped
image: server:${SERVER_IMAGE_TAG}
hostname: django
command: /bin/bash -c "/tmp/startup.sh && echo 'export DJANGO_SETTINGS_MODULE=core.settings.dev' >> /etc/apache2/envvars"
ports:
- "4443:443"
- "8080:80"
depends_on:
- rabbitmq
- redis
and a closer look at the command:
command: /bin/bash -c "/tmp/startup.sh && echo 'export DJANGO_SETTINGS_MODULE=core.settings.dev' >> /etc/apache2/envvars"
it is important to say that both of the command works fine