构建脚本准备
This commit is contained in:
29
build.sh
Normal file
29
build.sh
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
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=registry,ref=${REGISTRY}/devcontainers/develop-base:buildcache,mode=max \
|
||||||
|
--cache-from type=registry,ref=${REGISTRY}/devcontainers/develop-base:buildcache
|
||||||
|
popd
|
||||||
|
|
||||||
|
pushd universal-base
|
||||||
|
npx devcontainer build \
|
||||||
|
--platform linux/amd64,linux/arm64 \
|
||||||
|
--image-name ${REGISTRY}/devcontainers/universal-base --push \
|
||||||
|
--cache-to type=registry,ref=${REGISTRY}/devcontainers/universal-base:buildcache,mode=max \
|
||||||
|
--cache-from type=registry,ref=${REGISTRY}/devcontainers/universal-base:buildcache
|
||||||
|
popd
|
||||||
23
system-setup.sh
Normal file
23
system-setup.sh
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
sudo apt update
|
||||||
|
sudo apt install -y npm git
|
||||||
|
curl -fsSL https://raw.githubusercontent.com/docker/docker-install/master/install.sh | sh
|
||||||
|
sudo usermod -aG docker $USER
|
||||||
|
docker buildx create --use --bootstrap --name multiarch-builder --driver-opt network=host
|
||||||
|
echo "127.0.0.1 registry.yqxpro.com" | sudo tee -a /etc/hosts
|
||||||
|
|
||||||
|
tar xvzf certs.tgz
|
||||||
|
docker run -d \
|
||||||
|
--restart=always \
|
||||||
|
--name registry \
|
||||||
|
-v "$(pwd)"/certs:/certs \
|
||||||
|
-e REGISTRY_HTTP_ADDR=0.0.0.0:443 \
|
||||||
|
-e REGISTRY_HTTP_TLS_CERTIFICATE=/certs/registry.yqxpro.com.crt \
|
||||||
|
-e REGISTRY_HTTP_TLS_KEY=/certs/registry.yqxpro.com.key \
|
||||||
|
-p 443:443 \
|
||||||
|
registry:3
|
||||||
|
|
||||||
|
git clone https://gitea.yqxpro.com/QXYang686/devcontainers.git
|
||||||
|
cd devcontainers
|
||||||
|
npm install
|
||||||
Reference in New Issue
Block a user