improving the dockerfile and the building
This commit is contained in:
26
docker/build.sh
Normal file
26
docker/build.sh
Normal file
@@ -0,0 +1,26 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if the first parameter is provided
|
||||
if [ -z "$1" ]; then
|
||||
echo "Error: Semantic version parameter is required."
|
||||
echo "Usage: $0 <semantic_version>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Building Lurana Open Source version $1"
|
||||
|
||||
# Update and install Composer dependencies
|
||||
composer update
|
||||
composer install
|
||||
|
||||
# Construct the Docker image tag name
|
||||
tagname="gitlab.luranasoft.com:5050/pm/processmaker:$1"
|
||||
echo "Docker tag name: $tagname"
|
||||
|
||||
# Build the Docker image using the new tag name
|
||||
docker build -t "$tagname" -f ./docker/Dockerfile .
|
||||
|
||||
# Push the Docker image to the repository
|
||||
docker push "$tagname"
|
||||
|
||||
echo "Build and push completed successfully."
|
||||
Reference in New Issue
Block a user