piszczynski>Aleks No edit summary |
piszczynski>Aleks |
||
Line 1: | Line 1: | ||
== Docker Commands == | == Docker Commands == | ||
Docker commands reference can be found here: | |||
https://docs.docker.com/engine/reference/run/ | |||
Stop docker container | Stop docker container | ||
*docker stop <container name> | *docker stop <container name> | ||
Line 13: | Line 17: | ||
When running docker containers the run command will require extra options for containers with specific uses. Environment vairables can be added to a document container on startup using a .env file and the switch "--env-file=<path to env file>" in the run command | When running docker containers the run command will require extra options for containers with specific uses. Environment vairables can be added to a document container on startup using a .env file and the switch "--env-file=<path to env file>" in the run command | ||
---- | ---- | ||
== Docker High CPU usage == | == Docker High CPU usage == | ||
See what containers are using system resources: | See what containers are using system resources: |
Revision as of 15:41, 2 August 2022
Docker Commands
Docker commands reference can be found here: https://docs.docker.com/engine/reference/run/
Stop docker container
- docker stop <container name>
remove container
- docker rm <container name>
run container
- docker run --name <container name>
When running docker containers the run command will require extra options for containers with specific uses. Environment vairables can be added to a document container on startup using a .env file and the switch "--env-file=<path to env file>" in the run command
Docker High CPU usage
See what containers are using system resources:
- docker stats -all
- docker stats --all --format "table Template:.ID\tTemplate:.Name\tTemplate:.CPUPerc\tTemplate:.MemUsage"
Check specific container for process:
- docker ps | grep <container id>
Check the logs for high cpu use container:
- docker logs --tail 100 <container Id>
Follow live logs:
- docker logs --follow <container ID>
restart docker container
- docker restart <container name>