chore: update Dockerfile
This commit is contained in:
18
build-docker.sh
Executable file
18
build-docker.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
REGISTRY="harbor.cl1.parano.ch/library"
|
||||
IMAGE="myice"
|
||||
|
||||
current_commit=$(git rev-parse HEAD)
|
||||
|
||||
git_tag=$(git tag --points-at "$current_commit")
|
||||
|
||||
if [[ -z $git_tag ]]; then
|
||||
echo "Build only works on a git tag" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
docker build --platform linux/amd64 -t "$REGISTRY/$IMAGE:$git_tag" .
|
||||
docker push "$REGISTRY/$IMAGE:$git_tag"
|
||||
Reference in New Issue
Block a user