This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
docpublic:systemes:docker_linux [2024/12/07 22:31] adminjp [docker compose] |
docpublic:systemes:docker_linux [2026/01/03 20:42] (current) adminjp [docker image store] |
||
|---|---|---|---|
| Line 8: | Line 8: | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| * https:// | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| + | * https:// | ||
| Line 210: | Line 214: | ||
| </ | </ | ||
| + | === change image location root-dir === | ||
| + | < | ||
| + | root@deb13lthp640: | ||
| + | root@deb13lthp640: | ||
| + | root@deb13lthp640: | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | root@deb13lthp640: | ||
| + | root@deb13lthp640: | ||
| + | { | ||
| + | " | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | stop docker | ||
| + | |||
| + | < | ||
| + | |||
| + | root@deb13lthp640: | ||
| + | root@deb13lthp640: | ||
| + | </ | ||
| + | |||
| + | |||
| + | and copy files from original root-dir | ||
| + | |||
| + | < | ||
| + | |||
| + | root@deb13lthp640: | ||
| + | sending incremental file list | ||
| + | ./ | ||
| + | engine-id | ||
| + | 36 100% 0, | ||
| + | buildkit/ | ||
| + | buildkit/ | ||
| + | | ||
| + | buildkit/ | ||
| + | | ||
| + | buildkit/ | ||
| + | buildkit/ | ||
| + | | ||
| + | buildkit/ | ||
| + | 25 100% | ||
| + | buildkit/ | ||
| + | buildkit/ | ||
| + | containers/ | ||
| + | containers/ | ||
| + | containers/ | ||
| + | 2.346 100% 2, | ||
| + | containers/ | ||
| + | 3.037 100% 2, | ||
| + | containers/ | ||
| + | 1.866 100% 1, | ||
| + | containers/ | ||
| + | 13 100% | ||
| + | containers/ | ||
| + | 148 100% 144, | ||
| + | containers/ | ||
| + | 277 100% 270, | ||
| + | containers/ | ||
| + | 71 100% | ||
| + | containers/ | ||
| + | containers/ | ||
| + | network/ | ||
| + | network/ | ||
| + | network/ | ||
| + | | ||
| + | plugins/ | ||
| + | plugins/ | ||
| + | rootfs/ | ||
| + | rootfs/ | ||
| + | runtimes/ | ||
| + | swarm/ | ||
| + | tmp/ | ||
| + | volumes/ | ||
| + | volumes/ | ||
| + | volumes/ | ||
| + | | ||
| + | </ | ||
| + | |||
| + | restart | ||
| + | |||
| + | < | ||
| + | root@deb13lthp640: | ||
| + | root@deb13lthp640: | ||
| + | > ^C | ||
| + | root@deb13lthp640: | ||
| + | | ||
| + | </ | ||
| ==== run interactive terminal (-it) ==== | ==== run interactive terminal (-it) ==== | ||
| Line 325: | Line 418: | ||
| php-apache/ | php-apache/ | ||
| </ | </ | ||
| + | |||
| + | ===== docker compose et dockerfile combiné www-site ===== | ||
| + | |||
| + | ==== site DocumentRoot et content ==== | ||
| + | |||
| + | < | ||
| + | jehan@debL74-14212: | ||
| + | |||
| + | jehan@debL74: | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | ==== DockerFile ==== | ||
| + | |||
| + | < | ||
| + | jehan@debL74: | ||
| + | FROM php:apache | ||
| + | RUN docker-php-ext-install pdo pdo_mysql mysqli | ||
| + | </ | ||
| + | |||
| + | ==== Docker compose projet www site ==== | ||
| + | |||
| + | < | ||
| + | jehan@debL74: | ||
| + | services: | ||
| + | php: | ||
| + | build: | ||
| + | dockerfile: ./ | ||
| + | container_name: | ||
| + | restart: always | ||
| + | volumes: | ||
| + | - ~/ | ||
| + | ports: | ||
| + | - 9090:80 | ||
| + | </ | ||
| + | |||
| + | ==== Run docker compose & file www site ==== | ||
| + | |||
| + | instance de CT resultat de la combinaison du docker compose incluant le dockerfile ci-dessus | ||
| + | |||
| + | < | ||
| + | jehan@debL74: | ||
| + | [+] Building 1.3s (7/7) FINISHED | ||
| + | => [php internal] load build definition from dockerfile-phpjp1.dck | ||
| + | => => transferring dockerfile: 112B 0.0s | ||
| + | => [php internal] load metadata for docker.io/ | ||
| + | => [php internal] load .dockerignore | ||
| + | => => transferring context: 2B 0.0s | ||
| + | => [php 1/2] FROM docker.io/ | ||
| + | => CACHED [php 2/2] RUN docker-php-ext-install pdo pdo_mysql mysqli | ||
| + | => [php] exporting to image 0.0s | ||
| + | => => exporting layers | ||
| + | => => writing image sha256: | ||
| + | => => naming to docker.io/ | ||
| + | => [php] resolving provenance for metadata file 0.0s | ||
| + | WARN[0001] Found orphan containers ([phpmyadmin db]) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up. | ||
| + | [+] Running 1/1 | ||
| + | ✔ Container php Started | ||
| + | jehan@debL74: | ||
| + | CONTAINER ID | ||
| + | b22bc9482808 | ||
| + | </ | ||
| + | |||
| + | < | ||
| + | jehan@debL74: | ||
| + | root@b22bc9482808:/ | ||
| + | index.html | ||
| + | </ | ||
| + | |||
| + | ==== consultation cliente ==== | ||
| + | |||
| + | http:// | ||
| + | |||
| + | docker web site JP1 | ||