feat: 更新本地缓存资源路径
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ ARG REGISTRY_URL="docker.colovu.com/"
|
||||
ARG APT_SOURCE=aliyun
|
||||
|
||||
# 编译镜像时指定用于加速的本地软件包存储服务器地址
|
||||
ARG LOCAL_URL=""
|
||||
ARG LOCAL_URL="https://local.colovu.com/dist"
|
||||
|
||||
|
||||
# 1. 生成镜像 =====================================================================
|
||||
|
||||
@@ -23,7 +23,7 @@ build-arg+=--build-arg APT_SOURCE=$(APT_SOURCE)
|
||||
|
||||
# 设置本地下载服务器路径,加速调试时的本地编译速度
|
||||
local_ip:=`echo "en0 eth0" | xargs -n1 ip addr show 2>/dev/null | grep inet | grep -v 127.0.0.1 | grep -v inet6 | tr "/" " " | awk '{print $$2}'`
|
||||
build-arg+=--build-arg LOCAL_URL=http://$(local_ip)/dist-files
|
||||
build-arg+=--build-arg LOCAL_URL=https://local.colovu.com/dist
|
||||
|
||||
.PHONY: build clean clearclean upgrade
|
||||
|
||||
@@ -32,7 +32,7 @@ export DOCKER_SCAN_SUGGEST=false
|
||||
|
||||
build:
|
||||
@echo "Build $(image_name):$(image_tag)"
|
||||
@docker build --progress plain --force-rm $(build-arg) -t $(image_name):$(image_tag) .
|
||||
@docker buildx build --progress plain --force-rm $(build-arg) -t $(image_name):$(image_tag) .
|
||||
@echo "Add tag: $(image_name):latest"
|
||||
@docker tag $(image_name):$(image_tag) $(image_name):latest
|
||||
@echo "Build complete"
|
||||
|
||||
Reference in New Issue
Block a user