Complete Dockerfile instruction reference list

This commit is contained in:
yeasy
2026-04-27 23:17:39 +00:00
parent 3d3befa16a
commit 16203c5018
16 changed files with 86 additions and 102 deletions
+1 -1
View File
@@ -26,7 +26,7 @@ Docker Compose 提供了丰富的命令来管理项目和容器。本节将详
**配置验证**
- `docker compose config`验证 compose.yaml ( docker-compose.yml) 格式是否正确
- `docker compose config`验证 docker-compose.yml 格式是否正确
### 11.4.1 命令对象与格式
@@ -5,11 +5,6 @@ services:
image: postgres
environment:
POSTGRES_PASSWORD: 'postgres'
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 5s
retries: 5
web:
build: .
@@ -18,6 +13,3 @@ services:
- .:/code
ports:
- "8000:8000"
depends_on:
db:
condition: service_healthy