mirror of
https://github.com/g3rv4/FakeRelay.git
synced 2024-11-21 14:53:07 +01:00
Avoid RUNs on the target Dockerfile
This commit is contained in:
parent
2fbc0744db
commit
bd9689f356
@ -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
entrypoint.sh
Normal file → Executable file
4
entrypoint.sh
Normal file → Executable file
@ -1,7 +1,7 @@
|
||||
#!/bin/ash
|
||||
|
||||
if [ "$1" = "web" ]; then
|
||||
web
|
||||
dotnet FakeRelay.Web.dll
|
||||
else
|
||||
cli "$@"
|
||||
dotnet FakeRelay.Cli.dll "$@"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user