faas/auth/basic-auth/build.sh
Alex Ellis ced4ee56dc Add Dockerfile override for ARM64
Signed-off-by: Alex Ellis <alexellis2@gmail.com>
2019-06-24 18:18:05 +01:00

31 lines
538 B
Bash
Executable File

#!/bin/sh
set -e
export arch=$(uname -m)
export eTAG="latest-dev"
export DOCKERFILE="Dockerfile"
if [ "$arch" = "armv7l" ] ; then
eTAG="latest-armhf-dev"
elif [ "$arch" = "aarch64" ] ; then
eTAG="latest-arm64-dev"
DOCKERFILE="Dockerfile.arm64"
fi
echo "$1"
if [ "$1" ] ; then
eTAG=$1
if [ "$arch" = "armv7l" ] ; then
eTAG="$1-armhf"
elif [ "$arch" = "aarch64" ] ; then
eTAG="$1-arm64"
fi
fi
NS=openfaas
echo Building $NS/basic-auth-plugin:$eTAG
docker build -t $NS/basic-auth-plugin:$eTAG . -f $DOCKERFILE