Updated build script
This commit is contained in:
22
build.sh
Normal file
22
build.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Exit immediately if any command exits with a non-zero status
|
||||
set -e
|
||||
|
||||
name="photogallery"
|
||||
version="1.0-0"
|
||||
registry="registry.unblue.uk"
|
||||
image_name="${registry}/${name}"
|
||||
|
||||
echo "🔨 Building Docker image for ${name}..."
|
||||
# Build the image using the local Dockerfile context
|
||||
docker build -t "${image_name}:${version}" -t "${image_name}:latest" .
|
||||
|
||||
echo "🚀 Pushing tags to ${registry}..."
|
||||
# Push the specific release version tag
|
||||
docker push "${image_name}:${version}"
|
||||
|
||||
# Push the latest tag
|
||||
docker push "${image_name}:latest"
|
||||
|
||||
echo "✅ Successfully built and pushed ${image_name}:${version} and :latest"
|
||||
Reference in New Issue
Block a user