feat: 更新本地缓存资源路径
This commit is contained in:
+1
-1
@@ -28,7 +28,7 @@ ARG REGISTRY_URL="docker.colovu.com/"
|
||||
ARG APT_SOURCE=ustc
|
||||
|
||||
# 编译镜像时指定用于加速的本地软件包存储服务器地址
|
||||
ARG LOCAL_URL=""
|
||||
ARG LOCAL_URL="https://local.colovu.com/dist"
|
||||
|
||||
# 1. 生成镜像 =====================================================================
|
||||
FROM --platform=${TARGETPLATFORM:-linux/amd64} ${REGISTRY_URL}library/alpine:${APP_VER}
|
||||
|
||||
@@ -24,13 +24,13 @@ 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
|
||||
|
||||
build:
|
||||
@echo "Build $(image_name):$(image_tag)"
|
||||
@docker build --force-rm $(build-arg) -t $(image_name):$(image_tag) .
|
||||
@docker buildx build --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