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 [05/07/2016 12:06] – [docker images] cyrille | informatique:docker [12/09/2021 14:02] – [nginx-proxy] cyrille | ||
---|---|---|---|
Ligne 38: | Ligne 38: | ||
* [[https:// | * [[https:// | ||
* [[https:// | * [[https:// | ||
+ | |||
+ | [[https:// | ||
Cheat sheets: | Cheat sheets: | ||
Ligne 51: | Ligne 53: | ||
* [[https:// | * [[https:// | ||
==== Installation ==== | ==== Installation ==== | ||
+ | |||
+ | * Ubuntu: https:// | ||
+ | * Debian: https:// | ||
<code bash> | <code bash> | ||
Ligne 83: | Ligne 88: | ||
</ | </ | ||
+ | if you are running short-term foreground processes, add '' | ||
+ | |||
+ | Voir [[https:// | ||
=== docker start === | === docker start === | ||
Ligne 132: | Ligne 140: | ||
-q, --quiet | -q, --quiet | ||
</ | </ | ||
+ | |||
+ | === docker commit === | ||
+ | |||
+ | [[https:// | ||
=== docker save === | === docker save === | ||
<code bash> | <code bash> | ||
- | | + | |
+ | </ | ||
+ | ou | ||
+ | <code bash> | ||
+ | | ||
</ | </ | ||
+ | === docker cp === | ||
+ | |||
+ | Pour copier un fichier du container vers le host; | ||
+ | <code bash> | ||
+ | docker cp [OPTIONS] CONTAINER: | ||
+ | </ | ||
+ | |||
+ | === docker volume rm === | ||
+ | |||
+ | <code bash> | ||
+ | docker volume rm [OPTIONS] VOLUME [VOLUME...] | ||
+ | </ | ||
==== Dockerfile ==== | ==== Dockerfile ==== | ||
Ligne 157: | Ligne 185: | ||
https:// | https:// | ||
- | ==== Compose ==== | + | ==== Compose |
Docker Compose permet de créer et configurer un ensemble de conteneurs avec un fichier YAML. | Docker Compose permet de créer et configurer un ensemble de conteneurs avec un fichier YAML. | ||
Ligne 174: | Ligne 202: | ||
$ machine create -d [infrastructure provider] [provider options] [machine name] | $ machine create -d [infrastructure provider] [provider options] [machine name] | ||
</ | </ | ||
+ | |||
+ | ==== Rancher ==== | ||
+ | |||
+ | [[http:// | ||
===== Images Docker ===== | ===== Images Docker ===== | ||
- | ==== nginx-proxy ==== | + | ==== nginx-proxy |
+ | |||
+ | * https:// | ||
+ | * https:// | ||
+ | |||
+ | C'est le reverse proxy pour d' | ||
+ | |||
+ | 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. | ||
+ | |||
+ | * Automated creation/ | ||
+ | * Let's Encrypt / ACME domain validation through http-01 challenge only. | ||
+ | * Automated update and reload of nginx config on certificate creation/ | ||
+ | * Support creation of Multi-Domain (SAN) Certificates. | ||
+ | * Creation of a Strong Diffie-Hellman Group at startup. | ||
+ | * 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 " | ||
+ | | ||
+ | </ | ||
- | * https:// | + | Et voilà le container '' |
- | * https:// | + | |
- | Le container [[https:// | ||
- | Le conteneur nginx-proxy peut-être démarré après les virtualhosts conteneurs. C'est cool pour le boot du système ;-) | ||
==== webdevops ==== | ==== webdevops ==== | ||
Ligne 306: | Ligne 398: | ||
In the second instruction, | In the second instruction, | ||
+ | |||
+ | ==== Docker Compose ==== | ||
+ | |||
+ | * Here is a docker compose for Laravel (example) : https:// | ||
informatique/docker.txt · Dernière modification : 24/11/2023 20:44 de cyrille