forked from bargees/barge-os
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imgbuild.sh
27 lines (21 loc) · 894 Bytes
/
imgbuild.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
source /etc/profile
export |grep DOCKER_REG
repo=registry.cn-shenzhen.aliyuncs.com
echo "${DOCKER_REGISTRY_PW_infrastSubUser2}" |docker login --username=${DOCKER_REGISTRY_USER_infrastSubUser2} --password-stdin $repo
# repoHub=docker.io
# echo "${DOCKER_REGISTRY_PW_dockerhub}" |docker login --username=${DOCKER_REGISTRY_USER_dockerhub} --password-stdin $repoHub
# repo=registry-1.docker.io
ns=infrastlabs
ver=v5
img="barge-build-output:latest"
#buildx
# plat="--platform linux/amd64,linux/arm64" #,linux/arm
# --network=host: docker buildx create --use --name mybuilder2 --buildkitd-flags '--allow-insecure-entitlement network.host'
# docker buildx build $plat --push -t $ns/$img -f src/Dockerfile.compile .
#dockerBuild
case "$1" in
*)
docker build --build-arg TARGETPLATFORM="linux/amd64" -t $repo/$ns/$img -f Dockerfile.output .
docker push $repo/$ns/$img
;;
esac