From d337826415bf13b7de110a30076e779ce8a9e686 Mon Sep 17 00:00:00 2001 From: Julian Brost Date: Wed, 2 Apr 2025 11:22:15 +0200 Subject: [PATCH] Containerfile: allow running the binary without absolute path This sets the PATH environment variable so that the binary installed to the container image can be found by just its name. This makes it nicer to manually provide a command by the container, so for example, now "docker run --rm -it icinga/icingadb:dev icingadb --version" works. The binary is still installed under the same path, so it can still be invoked using the same absolute path as before. --- Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Containerfile b/Containerfile index fc8ec0e3..528beb30 100644 --- a/Containerfile +++ b/Containerfile @@ -40,4 +40,5 @@ COPY --from=build /icingadb /icingadb USER icinga -CMD ["/icingadb", "--database-auto-import"] +ENV PATH=/ +CMD ["icingadb", "--database-auto-import"]