Compare commits
16 Commits
13fe440e4b
...
b8a6822ef5
| Author | SHA1 | Date | |
|---|---|---|---|
| b8a6822ef5 | |||
| bc660d97a5 | |||
| 45be8dc7c8 | |||
| 72960224f7 | |||
| ec6f6895a9 | |||
| 9de14ff3a2 | |||
| 07198f87ce | |||
| 47647869f0 | |||
| 2d14a3a427 | |||
| 6a6cdaf852 | |||
| 62cdb18e6c | |||
| a5548eb652 | |||
| df5403e3af | |||
| 223242e7aa | |||
| 3b381be4da | |||
| bc28e1ce42 |
26
Makefile
Normal file
26
Makefile
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# 切换到 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