From 66cd955a882e0e498042575158a2a91b66c78185 Mon Sep 17 00:00:00 2001 From: Martin Hebnes Pedersen Date: Sun, 5 Nov 2023 07:42:56 +0100 Subject: [PATCH] docker: Make it easier to run on-off commands Set ENTRYPOINT to the Pat executable, and use CMD to provide default arguments. By doing this, users can run on-off commands with docker as if the app was running natively on the host. E.g. `docker compose run pat interactive`. --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 8aa9c476..c4aa19e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,4 +18,5 @@ ENV XDG_CONFIG_HOME=/app ENV XDG_DATA_HOME=/app ENV XDG_STATE_HOME=/app EXPOSE 8080 -ENTRYPOINT ["/bin/pat", "http", "--addr", ":8080"] +ENTRYPOINT ["/bin/pat"] +CMD ["http", "--addr", ":8080"]