-
Notifications
You must be signed in to change notification settings - Fork 0
/
notes
26 lines (24 loc) · 1.23 KB
/
notes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
Remover containers nao usados
docker rm $(docker ps -q -f status=exited)
Remover imagens nao usadas
docker rmi $(docker images | grep "^<none>" | awk "{print $3}")
Volumes orfaos
docker volume ls -qf dangling=true
Remover volumes orfaos
docker volume rm $(docker volume ls -qf dangling=true)
Stats com os nome dos containers
docker stats $(docker ps --format={{.Names}})
--------------------------------------------------------------
Gerar certificados Let's encrypt com Docker
--------------------------------------------------------------
https://thisendout.com/2016/04/21/letsencrypt-certificate-generation-with-docker/
docker run -d -p 80:80 --name nginx -v /usr/share/nginx/html nginx
docker run -it --name letsencrypt --volumes-from nginx quay.io/letsencrypt/letsencrypt certonly --agree-tos --webroot --webroot-path /usr/share/nginx/html -m seniocaires@gmail.com -d dominio.com.br.br
docker cp letsencrypt:/etc/letsencrypt/ letsencrypt
--------------------------------------------------------------
Habilitar API Debian
--------------------------------------------------------------
nano /lib/systemd/system/docker.service
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock
systemctl daemon-reload
service docker restart