Skip to content

Commit

Permalink
Avoid RUNs on the target Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
g3rv4 committed Jan 1, 2024
1 parent 2fbc074 commit bd9689f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
4 changes: 2 additions & 2 deletions entrypoint.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/ash

if [ "$1" = "web" ]; then
web
dotnet FakeRelay.Web.dll
else
cli "$@"
dotnet FakeRelay.Cli.dll "$@"
fi

0 comments on commit bd9689f

Please sign in to comment.