Update build and run scripts to support Apple's container.
This commit is contained in:
17
build.sh
17
build.sh
@@ -1,17 +1,14 @@
|
||||
#!//usr/bin/env bash
|
||||
|
||||
IMAGE_NAME="azure-image-chooser"
|
||||
#IMAGE="docker.io/skoszewski/$IMAGE_NAME"
|
||||
IMAGE="skdomlab.azurecr.io/$IMAGE_NAME"
|
||||
IMAGE="docker.io/skoszewski/$IMAGE_NAME:latest"
|
||||
# IMAGE="skdomlab.azurecr.io/$IMAGE_NAME"
|
||||
|
||||
if [ ! -z "$(command -v docker)" ] && [ "$(basename $(command -v docker))" = "docker" ]; then
|
||||
CMD="docker"
|
||||
elif [ ! -z "$(command -v podman)" ] && [ "$(basename $(command -v podman))" = "podman" ]; then
|
||||
CMD="podman"
|
||||
if command -v docker > /dev/null; then
|
||||
docker buildx build -t $IMAGE app
|
||||
elif command -v container > /dev/null; then
|
||||
container build -t $IMAGE app
|
||||
else
|
||||
echo "No suitable container tool found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
$CMD build --platform=linux/amd64 -t $IMAGE app
|
||||
$CMD push $IMAGE
|
||||
fi
|
||||
Reference in New Issue
Block a user