构建脚本准备

This commit is contained in:
2026-02-14 20:22:21 +08:00
parent 542be845b7
commit 13fe440e4b
2 changed files with 51 additions and 0 deletions

30
build.sh Normal file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
export REGISTRY=registry.yqxpro.com
pushd common-base
npx devcontainer build \
--platform linux/amd64,linux/arm64 \
--image-name ${REGISTRY}/devcontainers/common-base \
--cache-to type=registry,ref=${REGISTRY}/devcontainers/common-base:buildcache,mode=max \
--cache-from type=registry,ref=${REGISTRY}/devcontainers/common-base:buildcache && \
docker push ${REGISTRY}/devcontainers/common-base &&\
popd
pushd develop-base
npx devcontainer build \
--platform linux/amd64,linux/arm64 \
--image-name ${REGISTRY}/devcontainers/develop-base \
--cache-to type=local,ref=${REGISTRY}/devcontainers/develop-base,mode=max \
--cache-from type=local,ref=${REGISTRY}/devcontainers/develop-base && \
docker push ${REGISTRY}/devcontainers/develop-base &&\
popd
pushd universal-base
npx devcontainer build \
--platform linux/amd64,linux/arm64 \
--image-name ${REGISTRY}/devcontainers/universal-base \
--cache-to type=local,dest=${HOME}/docker-buildcache/devcontainers/universal-base,mode=max \
--cache-from type=local,src=${HOME}/docker-buildcache/devcontainers/universal-base && \
docker push ${REGISTRY}/devcontainers/universal-base &&\
popd