This commit is contained in:
parent
d92a433115
commit
0338fa76ad
|
|
@ -2,7 +2,7 @@
|
||||||
FROM node:18-bullseye-slim AS builder
|
FROM node:18-bullseye-slim AS builder
|
||||||
|
|
||||||
# 设置构建参数(提前定义,后续build、ENV都能用)
|
# 设置构建参数(提前定义,后续build、ENV都能用)
|
||||||
ARG BLOGAI_HOST=192.168.0.181
|
ARG BLOGAI_HOST=192.168.10.104
|
||||||
|
|
||||||
# 设置构建环境变量
|
# 设置构建环境变量
|
||||||
ENV NODE_ENV=development
|
ENV NODE_ENV=development
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
FROM node:18-slim AS runner
|
FROM node:18-slim AS runner
|
||||||
|
|
||||||
# 重新定义build参数,且默认值一致
|
# 重新定义build参数,且默认值一致
|
||||||
ARG BLOGAI_HOST=192.168.0.181
|
ARG BLOGAI_HOST=192.168.10.104
|
||||||
|
|
||||||
# 设置运行环境变量
|
# 设置运行环境变量
|
||||||
ENV NODE_ENV=production
|
ENV NODE_ENV=production
|
||||||
|
|
|
||||||
1
build.sh
1
build.sh
|
|
@ -2,6 +2,7 @@
|
||||||
docker build \
|
docker build \
|
||||||
--build-arg http_proxy=http://127.0.0.1:7890 \
|
--build-arg http_proxy=http://127.0.0.1:7890 \
|
||||||
--build-arg https_proxy=http://127.0.0.1:7890 \
|
--build-arg https_proxy=http://127.0.0.1:7890 \
|
||||||
|
--build-arg BLOGAI_HOST=192.168.10.104 \
|
||||||
--network=host \
|
--network=host \
|
||||||
-t cradle:latest \
|
-t cradle:latest \
|
||||||
-f apps/blogai/Dockerfile .
|
-f apps/blogai/Dockerfile .
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue