Compare commits
2 Commits
b8a6822ef5
...
13fe440e4b
| Author | SHA1 | Date | |
|---|---|---|---|
| 13fe440e4b | |||
| 542be845b7 |
26
Makefile
26
Makefile
@@ -1,26 +0,0 @@
|
||||
# 切换到 bash
|
||||
SHELL := /bin/bash
|
||||
|
||||
# 定义变量
|
||||
REGISTRY ?= crpi-kbfsbvlqwt19zxum-vpc.cn-hongkong.personal.cr.aliyuncs.com/registry-yqxpro
|
||||
GIT_SHA := $(shell git rev-parse --short HEAD)
|
||||
|
||||
# 定义所有需要构建的子目录
|
||||
SUBDIRS = common-base develop-base universal-base
|
||||
|
||||
all: $(SUBDIRS)
|
||||
|
||||
# 目录构建规则
|
||||
$(SUBDIRS):
|
||||
@echo "Building $@..."
|
||||
@pushd $@ && \
|
||||
npx devcontainer build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--image-name $(REGISTRY)/devcontainers-$@ \
|
||||
--cache-to type=local,dest=$(HOME)/docker-buildcache/devcontainers/$@,mode=max \
|
||||
--cache-from type=local,src=$(HOME)/docker-buildcache/devcontainers/$@ && \
|
||||
docker push $(REGISTRY)/devcontainers-$@ &&\
|
||||
popd
|
||||
|
||||
# 伪目标声明
|
||||
.PHONY: all $(SUBDIRS)
|
||||
Reference in New Issue
Block a user