diff --git a/docker/update_conduwuit.sh b/docker/update_conduwuit.sh new file mode 100644 index 0000000..17783e6 --- /dev/null +++ b/docker/update_conduwuit.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +# Navigate to the repository directory +cd "$HOME/conduwuit" || exit + +# Pull the latest changes +git pull + +# Build the Docker image using Nix +nix build -L --extra-experimental-features "nix-command flakes" .#oci-image-x86_64-linux-musl-all-features + +# Extract the image tarball path from the build result +IMAGE_TAR_PATH=$(nix path-info -r .#oci-image-x86_64-linux-musl-all-features)/image.tar.gz + +# Load the image into Docker and tag it +docker load < "$IMAGE_TAR_PATH" | awk '/Loaded image:/ { print $3 }' | xargs -I {} docker tag {} conduwuit:custom + +# Confirm tagging +echo "Docker image tagged as conduwuit:custom" \ No newline at end of file