mirror of
https://github.com/autistic-symposium/backend-and-orchestration-toolkit.git
synced 2025-06-29 08:57:12 -04:00
🐞 Add docker best practices
This commit is contained in:
parent
ecf672ee17
commit
6ff5b3d78c
1 changed files with 41 additions and 0 deletions
41
docker_best_practices.md
Normal file
41
docker_best_practices.md
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
# Docker Best Practices
|
||||||
|
|
||||||
|
## Installation in macOS
|
||||||
|
|
||||||
|
```
|
||||||
|
brew cask install docker
|
||||||
|
```
|
||||||
|
|
||||||
|
### Shared Folders
|
||||||
|
|
||||||
|
Removing some of the default shared folders can decrease CPU usage (e.g. remove `/Volumes` and `/private`).
|
||||||
|
|
||||||
|
Check storage with:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker info |grep Storage
|
||||||
|
```
|
||||||
|
|
||||||
|
### Performance
|
||||||
|
|
||||||
|
In case of performance problems you can run:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker run --rm=true -it --privileged --pid=host \
|
||||||
|
<image name> /usr/bin/top
|
||||||
|
```
|
||||||
|
|
||||||
|
### Cleaning Up
|
||||||
|
|
||||||
|
See disk space:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker system df
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
Remove stopped containers, dangling images, the build cache, and unused networks:
|
||||||
|
|
||||||
|
```
|
||||||
|
docker system prune
|
||||||
|
```
|
Loading…
Add table
Add a link
Reference in a new issue