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
|
@ -3,7 +3,7 @@ services:
|
||||||
# │ Server mode │
|
# │ Server mode │
|
||||||
# ╰─────────────╯
|
# ╰─────────────╯
|
||||||
caddydb-server:
|
caddydb-server:
|
||||||
image: caddydb:latest
|
image: git.k4li.de/docker/caddydb:latest
|
||||||
ports:
|
ports:
|
||||||
- "5000:5000"
|
- "5000:5000"
|
||||||
environment:
|
environment:
|
||||||
|
|
23
src/build.sh
23
src/build.sh
|
@ -17,12 +17,33 @@ command_exists() {
|
||||||
command -v "$@" >/dev/null 2>&1
|
command -v "$@" >/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
registry="git.k4li.de"
|
||||||
image="caddydb"
|
image="caddydb"
|
||||||
|
org="docker"
|
||||||
tag="latest"
|
tag="latest"
|
||||||
|
|
||||||
|
container_="${registry}/${org}/${image}:${tag}"
|
||||||
|
|
||||||
|
D_push() {
|
||||||
|
docker push "${container_}"
|
||||||
|
}
|
||||||
|
|
||||||
if command_exists docker; then
|
if command_exists docker; then
|
||||||
if [ -e ./Dockerfile ]; 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
|
else
|
||||||
echo_error "There was no dockerfile present in this directory: $PWD"
|
echo_error "There was no dockerfile present in this directory: $PWD"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue