dockerfiles/build/image-builder.sh

40 lines
599 B
Bash
Raw Normal View History

2021-05-18 01:19:12 +00:00
#!/bin/bash
build_rust() {
docker build --pull -t registry.sivert.pw/build/rust rust
}
push_rust() {
docker push registry.sivert.pw/build/rust
}
build_and_push_rust() {
build_rust
push_rust
}
echo ''
echo ' --- image-builder.sh (6000) ---'
echo ''
echo ' 0 - exit'
echo ''
echo ' # rust'
echo ' 1 - build'
echo ' 2 - both'
echo ' 3 - push'
echo ''
# TODO: add submenus for more build images
loop() {
echo -n 'what numba? '
read -r todo
case $todo in
'0') exit 0 ;;
'1') build_rust ;;
'2') build_and_push_rust ;;
'3') push_rust ;;
*) loop && exit 0;; # sus
esac
}
loop