将构建镜像源切换为阿里云并修复 apt 证书引导失败
默认 DEBIAN/ALPINE 源改为 mirrors.aliyun.com,compose 支持通过环境变量覆盖;构建时先装 ca-certificates,避免 slim 镜像换源后 HTTPS 校验失败。
This commit is contained in:
@@ -30,6 +30,10 @@ services:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: deploy/docker/backend.Dockerfile
|
||||
args:
|
||||
# 默认阿里云公共源;阿里云 ECS 内网可设 DEBIAN_MIRROR=mirrors.cloud.aliyuncs.com
|
||||
DEBIAN_MIRROR: ${DEBIAN_MIRROR:-mirrors.aliyun.com}
|
||||
NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmmirror.com}
|
||||
restart: unless-stopped
|
||||
env_file:
|
||||
- .env
|
||||
@@ -65,6 +69,8 @@ services:
|
||||
dockerfile: deploy/docker/frontend.Dockerfile
|
||||
args:
|
||||
APP_DOMAIN: ${APP_DOMAIN:-localhost}
|
||||
ALPINE_MIRROR: ${ALPINE_MIRROR:-mirrors.aliyun.com}
|
||||
NPM_REGISTRY: ${NPM_REGISTRY:-https://registry.npmmirror.com}
|
||||
restart: unless-stopped
|
||||
logging: *json-log-rotation
|
||||
depends_on:
|
||||
|
||||
Reference in New Issue
Block a user