mirror of
https://github.com/jbowdre/phpipam-agent-docker.git
synced 2024-12-27 05:02:19 +00:00
Create buildx.sh
This commit is contained in:
parent
8283c37955
commit
67a239cd82
1 changed files with 22 additions and 0 deletions
22
buildx.sh
Normal file
22
buildx.sh
Normal file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/sh
|
||||
DOCKER_REPO='mc303/phpipam-agent:latest'
|
||||
BUIILDX_REPO='buildphpipamagent'
|
||||
|
||||
# env DOCKER_BUILDKIT=1 docker build --no-cache -t $DOCKER_REPO .
|
||||
|
||||
#create platform buildx env
|
||||
echo "docker run --rm --privileged multiarch/qemu-user-static --reset -p yes"
|
||||
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
|
||||
|
||||
echo "docker buildx create --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 --name $BUIILDX_REPO"
|
||||
docker buildx create --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 --name $BUIILDX_REPO
|
||||
echo "docker buildx use $BUIILDX_REPO"
|
||||
docker buildx use $BUIILDX_REPO
|
||||
|
||||
# build platforms
|
||||
echo "docker buildx build --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 -t $DOCKER_REPO --push ."
|
||||
docker buildx build --platform=linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64 -t $DOCKER_REPO --push .
|
||||
|
||||
# remove build env
|
||||
echo "docker buildx rm $BUIILDX_REPO"
|
||||
docker buildx rm $BUIILDX_REPO
|
Loading…
Reference in a new issue