From 02e552325e90aea6ce62b9e1c20da8628cf3b942 Mon Sep 17 00:00:00 2001 From: sij <sij@sij.law> Date: Fri, 28 Mar 2025 15:49:20 +0000 Subject: [PATCH] Add docker/update_conduwuit.sh --- docker/update_conduwuit.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 docker/update_conduwuit.sh 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