docker compose run command code example
Example 1: docker compose run
docker-compose up --build -d --remove-orphans
docker-compose -f docker-compose.yml up --build -d --remove-orphans
Example 2: docker run command on container
sudo docker exec -it <container name> <command>
Example 3: docker run ubuntu container
docker run -it ubuntu
Example 4: insert bash command to docker-compose file
command: >
bash -c "python manage.py makemigrations
&& python manage.py migrate
&& python manage.py runserver 0.0.0.0:8000"