Compare commits
2 Commits
47647869f0
...
9de14ff3a2
| Author | SHA1 | Date | |
|---|---|---|---|
| 9de14ff3a2 | |||
| 07198f87ce |
32
build.sh
Normal file
32
build.sh
Normal file
@@ -0,0 +1,32 @@
|
||||
#!/bin/bash
|
||||
|
||||
export REGISTRY=registry.yqxpro.com
|
||||
|
||||
find . -name "Dockerfile" -type f -exec sed -i 's|registry.yqxpro.com|${REGISTRY}|g' {} +
|
||||
|
||||
pushd
|
||||
npx devcontainer build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--image-name ${REGISTRY}/devcontainers/common-base \
|
||||
--cache-to type=local,dest=$(HOME)/docker-buildcache/devcontainers/common-base,mode=max \
|
||||
--cache-from type=local,src=$(HOME)/docker-buildcache/devcontainers/common-base && \
|
||||
docker push ${REGISTRY}/devcontainers/common-base &&\
|
||||
popd
|
||||
|
||||
pushd
|
||||
npx devcontainer build \
|
||||
--platform linux/amd64,linux/arm64 \
|
||||
--image-name ${REGISTRY}/devcontainers/develop-base \
|
||||
--cache-to type=local,dest=$(HOME)/docker-buildcache/devcontainers/develop-base,mode=max \
|
||||
--cache-from type=local,src=$(HOME)/docker-buildcache/devcontainers/develop-base && \
|
||||
docker push ${REGISTRY}/devcontainers/develop-base &&\
|
||||
popd
|
||||
|
||||
pushd
|
||||
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
|
||||
Reference in New Issue
Block a user