version: '3.4'
services:
postgresql_database:
image: postgres:latest
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=123
- POSTGRES_DB=Games
ports:
- "5432:5432"
games.web:
image: ${DOCKER_REGISTRY-}gamesweb
build:
context: .
dockerfile: Games.Web\Dockerfile
depends_on:
- "postgresql_database"
depends_on
向外延伸build
,看起来像这样: