dokploy/docker/build.sh
2024-05-04 02:19:35 -06:00

18 lines
442 B
Bash
Executable File

#!/bin/bash
# Determine the type of build based on the first script argument
BUILD_TYPE=${1:-production}
if [ "$BUILD_TYPE" == "canary" ]; then
TAG="canary"
else
VERSION=$(node -p "require('./package.json').version")
TAG="$VERSION"
fi
BUILDER=$(docker buildx create --use)
docker buildx build --platform linux/amd64,linux/arm64,linux/arm/v7 --pull --rm -t "dokploy/dokploy:${TAG}" -f 'Dockerfile' .
docker buildx rm $BUILDER