informatique:docker
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédenteProchaine révisionLes deux révisions suivantes | ||
informatique:docker [11/09/2021 17:49] – [nginx-proxy] nginx-proxy/acme-companion cyrille | informatique:docker [07/05/2023 14:00] – [Mise à jour] cyrille | ||
---|---|---|---|
Ligne 203: | Ligne 203: | ||
</ | </ | ||
+ | ==== Docker Desktop ==== | ||
+ | |||
+ | https:// | ||
==== Rancher ==== | ==== Rancher ==== | ||
Ligne 209: | Ligne 212: | ||
===== Images Docker ===== | ===== Images Docker ===== | ||
- | ==== nginx-proxy ==== | + | ==== nginx-proxy |
- | * https://hub.docker.com/r/ | + | * https://github.com/nginx-proxy/ |
- | * https:// | + | * https:// |
- | Le container [[https:// | + | C'est le reverse proxy pour d' |
- | + | ||
- | ==== nginx-proxy/ | + | |
- | + | ||
- | https:// | + | |
acme-companion is a lightweight companion container for nginx-proxy. It handles the automated creation, renewal and use of LetsEncrypt SSL certificates for proxied Docker containers through the ACME protocol. | acme-companion is a lightweight companion container for nginx-proxy. It handles the automated creation, renewal and use of LetsEncrypt SSL certificates for proxied Docker containers through the ACME protocol. | ||
Ligne 228: | Ligne 227: | ||
* Creation of a Strong Diffie-Hellman Group at startup. | * Creation of a Strong Diffie-Hellman Group at startup. | ||
* Work with all versions of docker. | * Work with all versions of docker. | ||
+ | |||
+ | {{ https:// | ||
+ | |||
+ | Les 2 dans un docker-compose et le tour est joué: | ||
+ | <code yaml> | ||
+ | volumes: | ||
+ | conf: | ||
+ | vhost: | ||
+ | html: | ||
+ | dhparam: | ||
+ | certs: | ||
+ | acme: | ||
+ | |||
+ | services: | ||
+ | nginx-proxy: | ||
+ | image: nginxproxy/ | ||
+ | container_name: | ||
+ | ports: | ||
+ | - " | ||
+ | - " | ||
+ | volumes: | ||
+ | - conf:/ | ||
+ | - vhost:/ | ||
+ | - html:/ | ||
+ | - dhparam:/ | ||
+ | - certs:/ | ||
+ | - / | ||
+ | network_mode: | ||
+ | acme-companion: | ||
+ | image: nginxproxy/ | ||
+ | container_name: | ||
+ | volumes_from: | ||
+ | - nginx-proxy | ||
+ | volumes: | ||
+ | - certs:/ | ||
+ | - acme:/ | ||
+ | - / | ||
+ | network_mode: | ||
+ | </ | ||
+ | |||
+ | Il suffit ensuite de lancer des containers avec les ENV qui vont bien: | ||
+ | <code bash> | ||
+ | docker run -d -p 8000:8000 --name dokuwiki -v $(pwd)/ | ||
+ | --env " | ||
+ | --env " | ||
+ | --env " | ||
+ | --env " | ||
+ | | ||
+ | </ | ||
+ | |||
+ | Et voilà le container '' | ||
+ | |||
+ | <WRAP center round important 60%> | ||
+ | Il reste un mauvais point: le container '' | ||
+ | </ | ||
+ | |||
+ | On le voit sur le port '' | ||
+ | < | ||
+ | # netstat -tanp | grep LISTEN | ||
+ | tcp 0 0 0.0.0.0: | ||
+ | tcp 0 0 127.0.0.1: | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | tcp6 | ||
+ | </ | ||
==== webdevops ==== | ==== webdevops ==== | ||
Ligne 271: | Ligne 337: | ||
docker run --name=my-mysql-container --restart=always \ | docker run --name=my-mysql-container --restart=always \ | ||
-e MYSQL_ROOT_PASSWORD=mypwd -v / | -e MYSQL_ROOT_PASSWORD=mypwd -v / | ||
+ | </ | ||
+ | |||
+ | ==== Faire le ménage ==== | ||
+ | |||
+ | < | ||
+ | $ sudo docker system prune | ||
+ | WARNING! This will remove: | ||
+ | - all stopped containers | ||
+ | - all networks not used by at least one container | ||
+ | - all dangling images | ||
+ | - all dangling build cache | ||
+ | |||
+ | Are you sure you want to continue? [y/N] y | ||
+ | ... | ||
</ | </ | ||
informatique/docker.txt · Dernière modification : 24/11/2023 20:44 de cyrille