Skip to content

Commit 928c859

Browse files
author
David Linko
committed
added --ignore flag for podman volume creaete to avoid name error
1 parent 2154cfc commit 928c859

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

create_volume.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,16 +27,18 @@ if [ -n "$DOCKER_CMD" ]; then
2727
elif command -v podman &> /dev/null; then
2828
echo "Podman is installed"
2929
DOCKER_CMD="podman"
30+
EXTRA_FLAGS="--ignore"
3031
elif command -v docker &> /dev/null; then
3132
echo "Docker is installed"
3233
DOCKER_CMD="docker"
34+
EXTRA_FLAGS="--ignore"
3335
else
3436
echo "Neither Docker nor Podman is installed"
3537
exit 1
3638
fi
3739

3840

39-
${DOCKER_CMD} volume create ${VOLNAME}
41+
${DOCKER_CMD} volume create ${EXTRA_FLAGS} ${VOLNAME}
4042

4143
# Delete our created volume if there is an error to prevent issues on retry
4244
trap '${DOCKER_CMD} volume rm ${VOLNAME}' ERR
@@ -56,4 +58,4 @@ do
5658
done
5759

5860
# creating socket volume
59-
${DOCKER_CMD} volume create sockdir
61+
${DOCKER_CMD} volume create ${EXTRA_FLAGS} sockdir

0 commit comments

Comments
 (0)