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.
This commit is contained in:
Julian Brost 2025-04-02 11:22:15 +02:00
parent 5d43cb20d9
commit d337826415

View file

@ -40,4 +40,5 @@ COPY --from=build /icingadb /icingadb
USER icinga
CMD ["/icingadb", "--database-auto-import"]
ENV PATH=/
CMD ["icingadb", "--database-auto-import"]