Commit 5034a6f7 authored by Marcus Thelin's avatar Marcus Thelin
Browse files

Multi arch build script

parent ed254b07
Pipeline #14867 passed with stage
in 3 minutes and 38 seconds
......@@ -13,6 +13,9 @@ RUN apt-get install python3 python3-pip -y
RUN pip3 install awscli --upgrade --user
RUN ln -s ~/.local/bin/aws /usr/local/bin/aws
# Install custom multi arch script
COPY multi-builder.sh /usr/local/bin/multi-builder
# Install kubectl
RUN curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
RUN chmod +x ./kubectl
......
#!/bin/bash
set -e
DEFAULT_PLATFORMS="linux/amd64,linux/arm64,linux/arm/v7"
ARCH_PLATFORMS="${PLATFORMS:=linux/amd64,linux/arm64,linux/arm/v7}"
echo "Preparing multi arch build."
printf "Creating buildx context for platforms $ARCH_PLATFORMS"
docker buildx create --use --platform $ARCH_PLATFORMS
printf "\n\n"
docker buildx $@
printf "\n\n"
echo "Removing buildx context"
docker buildx rm
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment