Docker
Start an app
docker-compose up -d
# -d, --detach Detached mode: Run containers in the background, print new container names.Stop an app
docker-compose downList running containers
docker ps --no-truncRun commands inside a container
docker exec -it <container-id> bash
# Retrieve container id from command 'docker ps'Search for a running container with specific name
docker ps -f 'name=<string-in-container-name>'
# Only output the container id
docker ps -f 'name=<string-in-container-name>' --quietObjective
Command
Start an app
docker-compose up -d
# -d, --detach Detached mode: Run containers in the background, print new container names.Stop an app
docker-compose downList running containers
docker ps --no-truncRun commands inside a container
docker exec -it <container-id> bash
# Retrieve container id from command 'docker ps'Search for a running container with specific name
docker ps -f 'name=<string-in-container-name>'
# Only output the container id
docker ps -f 'name=<string-in-container-name>' --quietLast updated
Was this helpful?