From 51d8ae96381f128652c6845b3fb37875aa403b6d Mon Sep 17 00:00:00 2001 From: Gervasio Marchand Date: Sun, 4 Dec 2022 10:41:02 -0300 Subject: [PATCH] Make it easier to run --- Dockerfile | 5 +++-- entrypoint.sh | 7 +++++++ 2 files changed, 10 insertions(+), 2 deletions(-) create mode 100644 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index ec228a2..a60b61b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,5 +9,6 @@ FROM mcr.microsoft.com/dotnet/aspnet:6.0.11-alpine3.16 VOLUME ["/data"] ENV CONFIG_PATH=/data/config.json COPY --from=builder /app /app -RUN ln -s /app/FakeRelay.Cli /bin/cli -RUN ln -s /app/FakeRelay.Web /bin/web \ No newline at end of file +COPY entrypoint.sh /app/entrypoint.sh +RUN ln -s /app/FakeRelay.Cli /bin/cli && ln -s /app/FakeRelay.Web /bin/web && chmod +x /app/entrypoint.sh +ENTRYPOINT [ "/app/entrypoint.sh" ] diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..4f3a785 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,7 @@ +#!/bin/ash + +if [ "$1" = "web" ]; then + web +else + cli "$@" +fi