18 lines
422 B
Bash
Executable File
18 lines
422 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Specify the image name and tag
|
|
IMAGE_NAME="myp-rp"
|
|
IMAGE_TAG="latest"
|
|
|
|
# Build the Docker image from Containerfile
|
|
echo "Building Docker image from Containerfile..."
|
|
docker build -t ${IMAGE_NAME}:${IMAGE_TAG} -f $PWD/Containerfile $PWD
|
|
|
|
# Check if the build was successful
|
|
if [ $? -ne 0 ]; then
|
|
echo "Error occurred while building the Docker image"
|
|
exit 1
|
|
fi
|
|
|
|
echo "Docker image built successfully"
|