From 06baeea0090d7ebbc7a7c40d8409ce9abc08a0f6 Mon Sep 17 00:00:00 2001 From: imterah Date: Tue, 6 May 2025 21:50:02 -0400 Subject: [PATCH] fix: Fixes Docker image building always attempting to build --- README.md | 2 +- hosts/andromeda/stacks/caddy/docker-compose.nix | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3c17747..781a46e 100644 --- a/README.md +++ b/README.md @@ -36,7 +36,7 @@ I want to have ultra reliable and secure infrastructure for my personal use. The This server setup uses Docker, but not Docker Compose. Instead, we use NixOS built in OCI support, and `compose2nix` to help facilitate the setup of OCI containers. -I don't want obscure software patches (even if reliable!) needed for Nix. I want the official distributions, which is why I'm not using Nixpkgs (ie. `services.immich.enable = true;`). +I don't want obscure software patches (even if reliable!) needed because of Nix. I want the official distributions, which is why I'm not using Nixpkgs (ie. `services.immich.enable = true;`). ## Setup diff --git a/hosts/andromeda/stacks/caddy/docker-compose.nix b/hosts/andromeda/stacks/caddy/docker-compose.nix index c886a4b..abcfa1d 100644 --- a/hosts/andromeda/stacks/caddy/docker-compose.nix +++ b/hosts/andromeda/stacks/caddy/docker-compose.nix @@ -69,7 +69,9 @@ TimeoutSec = 300; }; script = '' - docker build -t caddy-custom:2.10.0-builder -f ${./volume/Dockerfile} . + if [[ "$(docker images -q caddy-custom:2.10.0-builder 2> /dev/null)" == "" ]]; then + docker build -t caddy-custom:2.10.0-builder -f ${./volume/Dockerfile} . + fi ''; };