Files
devcontainers/build.sh
2026-02-14 22:21:33 +08:00

28 lines
1.0 KiB
Bash

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