From bd9689f35634a693b4e3cd8463214f26c956d678 Mon Sep 17 00:00:00 2001 From: Gervasio Marchand Date: Mon, 1 Jan 2024 11:56:48 -0300 Subject: [PATCH] Avoid RUNs on the target Dockerfile --- Dockerfile | 3 +-- entrypoint.sh | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) mode change 100644 => 100755 entrypoint.sh diff --git a/Dockerfile b/Dockerfile index 31d3bd2..6873d28 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,9 +5,8 @@ COPY src /src/ RUN dotnet publish -c Release /src/FakeRelay.sln -o /app FROM mcr.microsoft.com/dotnet/aspnet:8.0.0-alpine3.18-${ARCH} -VOLUME ["/data"] +WORKDIR /app ENV CONFIG_PATH=/data/config.json COPY --from=builder /app /app 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 old mode 100644 new mode 100755 index 4f3a785..3ca82ff --- a/entrypoint.sh +++ b/entrypoint.sh @@ -1,7 +1,7 @@ #!/bin/ash if [ "$1" = "web" ]; then - web + dotnet FakeRelay.Web.dll else - cli "$@" + dotnet FakeRelay.Cli.dll "$@" fi