Start the container
docker-compose up
# or to run it as a daemon
docker-compose up -d
Stop running the container.
docker-compose down
Enter a running container.
docker exec -it <container-name> /bin/bash
Start the container
docker-compose -f docker-compose-volumes.yml up
# or to run it as a daemon
docker-compose -f docker-compose-volumes.yml up -d
Stop running the container.
docker-compose -f docker-compose-volumes.yml down
Enter a running container.
docker exec -it <container-name> /bin/bash
Run a command on an image.
docker run -it <image name> <command>
# Note the above command will leave a hanging container.
Run command on an existing and running container.
docker exec -it <container-name> <command>