Dockerfile
This commit is contained in:
15
build-docker-image.sh
Executable file
15
build-docker-image.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
[[ "$1" ]] && DOCKER_TAG="$1" || DOCKER_TAG="latest"
|
||||
[[ "$1" ]] && GIT_TAG="$1" || GIT_TAG=$(git describe --tags --always)
|
||||
GIT_HASH=$(git rev-parse --short HEAD)
|
||||
IPTVC_VERSION="${GIT_TAG}-${GIT_HASH}"
|
||||
|
||||
git checkout "${GIT_TAG}" 2>/dev/null
|
||||
docker build \
|
||||
--build-arg IPTVC_VERSION="${IPTVC_VERSION}" \
|
||||
--tag iptvc:"${DOCKER_TAG}" \
|
||||
--tag git.axenov.dev/iptv/iptvc:"${DOCKER_TAG}" \
|
||||
.
|
||||
|
||||
docker push git.axenov.dev/iptv/iptvc:"${DOCKER_TAG}"
|
||||
Reference in New Issue
Block a user