Docker compose kasutamine: erinevus redaktsioonide vahel
Allikas: Imre kasutab arvutit
Mine navigeerimisribaleMine otsikasti
Uus lehekülg: '===Sissejuhatus=== TODO ===Tööpõhimõte=== TODO ===Käsundamine=== Isikliku võrgu jms ressurssidega konteineri tekitamine <pre> # cat docker-compose-nginx.yml services: service_nginx: image: nginx:latest ports: - "8011:80" container_name: dc_nginx networks: - nw_nginx networks: nw_nginx: name: nw_nginx driver: bridge </pre> ===Kasulikud lisamaterjalid=== * TODO' |
Resümee puudub |
||
| 30. rida: | 30. rida: | ||
</pre> | </pre> | ||
Kasutamiseks sobib öelda | |||
<pre> | |||
$ docker compose -f docker-compose-nginx.yml up | |||
[+] Running 2/2 | |||
✔ Network nw_nginx Created 0.1s | |||
✔ Container dc_nginx Created 0.1s | |||
Attaching to dc_nginx | |||
dc_nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration | |||
dc_nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ | |||
dc_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh | |||
... | |||
</pre> | |||
Ning tulemusena on moodustunud sellised ressursid | |||
<pre> | |||
$ docker network ls | |||
NETWORK ID NAME DRIVER SCOPE | |||
3fe6d3988e37 bridge bridge local | |||
617b4a0d5de5 host host local | |||
d4743d12eb6a none null local | |||
67a9effbfa9b nw_nginx bridge local | |||
</pre> | |||
ning | |||
<pre> | |||
# docker container ls | |||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES | |||
78a420d0f791 nginx:latest "/docker-entrypoint.…" 43 minutes ago Up 1 second 0.0.0.0:8011->80/tcp dc_nginx | |||
</pre> | |||
===Kasulikud lisamaterjalid=== | ===Kasulikud lisamaterjalid=== | ||
* TODO | * TODO | ||
Redaktsioon: 29. mai 2024, kell 10:26
Sissejuhatus
TODO
Tööpõhimõte
TODO
Käsundamine
Isikliku võrgu jms ressurssidega konteineri tekitamine
# cat docker-compose-nginx.yml
services:
service_nginx:
image: nginx:latest
ports:
- "8011:80"
container_name: dc_nginx
networks:
- nw_nginx
networks:
nw_nginx:
name: nw_nginx
driver: bridge
Kasutamiseks sobib öelda
$ docker compose -f docker-compose-nginx.yml up [+] Running 2/2 ✔ Network nw_nginx Created 0.1s ✔ Container dc_nginx Created 0.1s Attaching to dc_nginx dc_nginx | /docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration dc_nginx | /docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/ dc_nginx | /docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh ...
Ning tulemusena on moodustunud sellised ressursid
$ docker network ls NETWORK ID NAME DRIVER SCOPE 3fe6d3988e37 bridge bridge local 617b4a0d5de5 host host local d4743d12eb6a none null local 67a9effbfa9b nw_nginx bridge local
ning
# docker container ls CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 78a420d0f791 nginx:latest "/docker-entrypoint.…" 43 minutes ago Up 1 second 0.0.0.0:8011->80/tcp dc_nginx
Kasulikud lisamaterjalid
- TODO