15 lines
382 B
Bash
Executable file
15 lines
382 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# ─< Check if the given command exists silently >─────────────────────────────────────────
|
|
command_exists() {
|
|
command -v "$@" >/dev/null 2>&1
|
|
}
|
|
|
|
NAME="testimage"
|
|
TAG="latest"
|
|
|
|
if command_exists docker; then
|
|
if [ -e Dockerfile ]; then
|
|
docker build -t "${NAME}:${TAG}" .
|
|
fi
|
|
fi
|