mirror of
https://github.com/DCsunset/docker-archlinux-vnc
synced 2025-12-06 17:04:58 +01:00
feat: add hooks to build different versions
This commit is contained in:
parent
047564e162
commit
59e4bff9ea
3 changed files with 29 additions and 0 deletions
13
hooks/build
Normal file
13
hooks/build
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# original docker build command
|
||||||
|
echo "overwriting docker build -f $DOCKERFILE_PATH -t $IMAGE_NAME ."
|
||||||
|
|
||||||
|
cat "../versions.txt" | while read VERSION
|
||||||
|
do
|
||||||
|
# The new image tag will include the version of ubuntu
|
||||||
|
IMAGE_TAG="${DOCKER_REPO}:${VERSION}"
|
||||||
|
|
||||||
|
echo "docker build -f Dockerfile --build-arg VERSION=${VERSION} -t ${IMAGE_TAG} ."
|
||||||
|
docker build -f Dockerfile --build-arg VERSION=${VERSION} -t ${IMAGE_TAG} .
|
||||||
|
done
|
||||||
13
hooks/push
Normal file
13
hooks/push
Normal file
|
|
@ -0,0 +1,13 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# original docker push command
|
||||||
|
echo "overwriting docker push $IMAGE_NAME"
|
||||||
|
|
||||||
|
cat "../versions.txt" | while read VERSION
|
||||||
|
do
|
||||||
|
# The new image tag will include the version of ubuntu
|
||||||
|
IMAGE_TAG="${DOCKER_REPO}:${VERSION}"
|
||||||
|
|
||||||
|
echo "docker push ${IMAGE_TAG}"
|
||||||
|
docker push ${IMAGE_TAG}
|
||||||
|
done
|
||||||
3
versions.txt
Normal file
3
versions.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
latest
|
||||||
|
18:04
|
||||||
|
16.04
|
||||||
Loading…
Reference in a new issue