在后台启动项目服务。
docker compose up -d在后台启动项目服务。
docker compose up -d在后台启动项目服务。
docker compose up -d| 参数 / 子句 | 说明 |
|---|---|
-d, --detach | 在后台运行服务。 |
--build | 启动容器前构建镜像。 |
--remove-orphans | 移除 Compose 文件中已不存在服务对应的容器。 |
--scale <service>=<n> | 设置某个服务的容器数量。 |
--wait | 等待服务进入运行或健康状态。 |
执行前请核对命令和目标路径。修改文件、服务、账户、磁盘、权限或数据库的操作可能难以撤销;建议先在安全环境测试并保留备份。