Addet container registry and changed compose to use it directly!
This commit is contained in:
parent
29577ea73a
commit
a31fd40a61
2 changed files with 23 additions and 2 deletions
23
src/build.sh
23
src/build.sh
|
@ -17,12 +17,33 @@ command_exists() {
|
|||
command -v "$@" >/dev/null 2>&1
|
||||
}
|
||||
|
||||
registry="git.k4li.de"
|
||||
image="caddydb"
|
||||
org="docker"
|
||||
tag="latest"
|
||||
|
||||
container_="${registry}/${org}/${image}:${tag}"
|
||||
|
||||
D_push() {
|
||||
docker push "${container_}"
|
||||
}
|
||||
|
||||
if command_exists docker; then
|
||||
if [ -e ./Dockerfile ]; then
|
||||
docker build -t "${image}:${tag}" .
|
||||
docker build -t "${container_}" .
|
||||
|
||||
echo_info "Do you also want to push ${container_} ? (Y/n): "
|
||||
read -r askPush </dev/tty
|
||||
|
||||
case "$askPush" in
|
||||
[Nn])
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
D_push
|
||||
;;
|
||||
esac
|
||||
|
||||
else
|
||||
echo_error "There was no dockerfile present in this directory: $PWD"
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue