Add 'rebuild.sh' to rebuild a docker image

This commit is contained in:
Tom Wiesing 2020-07-07 15:49:55 +02:00
parent 5905847b1c
commit a25c12b0fa
No known key found for this signature in database
GPG key ID: DC1F29F2BC78AB15
6 changed files with 57 additions and 11 deletions

View file

@ -41,7 +41,7 @@ function install_resource_dir() {
for filename in "$from"/*; do
dest="$to/`basename "${filename}"`"
echo "Writing \"$dest\""
cp -r "$filename" "$dest"
cp -rTv "$filename" "$dest"
done
}

View file

@ -13,4 +13,12 @@ export DEBIAN_FRONTEND=noninteractive
# This file just sets a few utility functions to be used by the code.
# randompw generates a random password as per the configuration file.
alias randompw="cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $PASSWORD_LENGTH | head -n 1"
alias randompw="cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w $PASSWORD_LENGTH | head -n 1"
# update_stack fully updates a docker-compose stack in the given location.
function update_stack() {
cd "$1"
docker-compose pull
docker-compose build --pull
docker-compose up -d
}