Add docker/update_conduwuit.sh
This commit is contained in:
parent
619e7d294b
commit
02e552325e
1 changed files with 19 additions and 0 deletions
19
docker/update_conduwuit.sh
Normal file
19
docker/update_conduwuit.sh
Normal file
|
@ -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"
|
Loading…
Add table
Reference in a new issue