Skip to content

Commit 7c40e03

Browse files
committed
Solve docker compose pack error for gitlab ci.
1 parent b09c84f commit 7c40e03

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

docker-compose.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,14 +88,19 @@ sub_pack(){
8888
exit 1
8989
fi
9090

91+
if [ -z "$IMAGE_NAME" ]; then
92+
echo "Error: IMAGE_NAME variable not defined"
93+
exit 1
94+
fi
95+
9196
# Get path where docker-compose.sh is located
9297
BASE_DIR="$(cd "$(dirname "$0")" && pwd)"
9398

9499
# Load default environment variables
95100
. $BASE_DIR/.env
96101

97102
# Get layer with the tag METACALL_CLEAR_OPTIONS to hook into the previous layer of the clean command
98-
DOCKER_HOOK_CLEAR=`docker image history --no-trunc metacall/core_dev | grep 'ARG METACALL_CLEAR_OPTIONS' | awk '{print $1}'`
103+
DOCKER_HOOK_CLEAR=`docker image history --no-trunc $IMAGE_NAME:runtime | grep 'ARG METACALL_CLEAR_OPTIONS' | awk '{print $1}'`
99104

100105
# Run the package builds
101106
docker run --name metacall_core_pack -it $DOCKER_HOOK_CLEAR /bin/bash -c ' \

0 commit comments

Comments
 (0)