Commandes de construction docker
docker image prune
DonRamon
docker image prune
docker system prune
services:
web:
external_links:
- redis_1
- project_db_1:mysql
docker service ls
# makes the `db` service available as the hostname `database`
# (implies depends_on)
links:
- db:database
- redis
docker service logs stack_name service_name
# make this service extend another
extends:
file: common.yml # optional
service: webapp
# build from custom Dockerfile
build:
context: ./dir
dockerfile: Dockerfile.dev
services:
web:
labels:
com.example.description: "Accounting web app"
# expose ports to linked services (not to host)
expose: ["3000"]