mirror of
https://github.com/JustArchiNET/ArchiSteamFarm
synced 2024-11-10 07:04:27 +00:00
Improve docker args
This commit is contained in:
parent
ad2c45adb6
commit
f210499874
4 changed files with 12 additions and 3 deletions
|
@ -6,9 +6,14 @@ if [[ -z "${ASF_ARGS-}" ]]; then
|
|||
ASF_ARGS=""
|
||||
fi
|
||||
|
||||
for ARG in "$@"; do
|
||||
ASF_ARGS+=" $ARG"
|
||||
done
|
||||
|
||||
# Kill underlying ASF process on shell process exit
|
||||
trap "trap - SIGTERM && kill -- -$$" SIGINT SIGTERM EXIT
|
||||
|
||||
while [[ -f ArchiSteamFarm.dll ]]; do
|
||||
dotnet ArchiSteamFarm.dll --service $ASF_ARGS # We will abort the script if ASF exits with an error
|
||||
dotnet ArchiSteamFarm.dll $ASF_ARGS # We will abort the script if ASF exits with an error
|
||||
sleep 1
|
||||
done
|
||||
|
|
|
@ -6,5 +6,9 @@ if [[ -z "${ASF_ARGS-}" ]]; then
|
|||
ASF_ARGS=""
|
||||
fi
|
||||
|
||||
for ARG in "$@"; do
|
||||
ASF_ARGS+=" $ARG"
|
||||
done
|
||||
|
||||
# We don't need our shell anymore, just replace the current process instead of starting a new one
|
||||
exec dotnet ArchiSteamFarm.dll $ASF_ARGS
|
||||
|
|
|
@ -7,4 +7,4 @@ RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo && \
|
|||
FROM microsoft/dotnet:2.0-runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build-env /app/ArchiSteamFarm/out ./
|
||||
ENTRYPOINT ["./ArchiSteamFarm.sh"]
|
||||
ENTRYPOINT ["./ArchiSteamFarm.sh", "--service"]
|
||||
|
|
|
@ -8,4 +8,4 @@ RUN dotnet publish ArchiSteamFarm -c Release -o out /nologo && \
|
|||
FROM microsoft/dotnet:2.0-runtime
|
||||
WORKDIR /app
|
||||
COPY --from=build-env /app/ArchiSteamFarm/out ./
|
||||
ENTRYPOINT ["./ArchiSteamFarm-Service.sh"]
|
||||
ENTRYPOINT ["./ArchiSteamFarm-Service.sh", "--service"]
|
||||
|
|
Loading…
Reference in a new issue