Build multiarch containers.
This commit is contained in:
parent
8c52b3a834
commit
c564d5a2f7
2 changed files with 54 additions and 0 deletions
35
arch.txt
Normal file
35
arch.txt
Normal file
|
@ -0,0 +1,35 @@
|
|||
aarch64
|
||||
# aarch64_be
|
||||
# alpha
|
||||
arm
|
||||
# armeb
|
||||
# cris
|
||||
# hppa
|
||||
i386
|
||||
# m68k
|
||||
# microblaze
|
||||
# microblazeel
|
||||
# mips
|
||||
# mips64
|
||||
# mips64el
|
||||
# mipsel
|
||||
# mipsn32
|
||||
# mipsn32el
|
||||
# nios2
|
||||
# or1k
|
||||
# ppc
|
||||
# ppc64
|
||||
# ppc64abi32
|
||||
ppc64le
|
||||
# riscv32
|
||||
# riscv64
|
||||
s390x
|
||||
# sh4
|
||||
# sh4eb
|
||||
# sparc
|
||||
# sparc32plus
|
||||
# sparc64
|
||||
# tilegx
|
||||
x86_64
|
||||
# xtensa
|
||||
# xtensaeb
|
19
build.sh
Executable file
19
build.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/usr/bin/env sh
|
||||
|
||||
platforms() {
|
||||
local plat="$(grep '^[^#].*' < arch.txt)"
|
||||
local arch_count="$(echo "$plat" | wc -l)"
|
||||
echo "$plat" | tr '\n' ',' | cut -d, -f1-$arch_count
|
||||
}
|
||||
|
||||
create() {
|
||||
docker buildx create --use
|
||||
}
|
||||
|
||||
build() {
|
||||
local tagname="$1"
|
||||
docker pull 'alpine:latest'
|
||||
docker buildx build --push --tag="$tagname" --platform="$(platforms)" .
|
||||
}
|
||||
|
||||
"$@"
|
Loading…
Reference in a new issue