forked from JustArchiNET/ArchiSteamFarm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.x64
28 lines (26 loc) · 1.2 KB
/
Dockerfile.x64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM node AS build-node
WORKDIR /app
COPY ASF-ui .
RUN echo "node: $(node --version)" && \
echo "npm: $(npm --version)" && \
npm ci && \
npm run-script deploy
FROM microsoft/dotnet:2.2-sdk AS build-dotnet
ENV CONFIGURATION Release
ENV NET_CORE_VERSION netcoreapp2.2
WORKDIR /app
COPY --from=build-node /app/dist ASF-ui/dist
COPY ArchiSteamFarm ArchiSteamFarm
COPY ArchiSteamFarm.Tests ArchiSteamFarm.Tests
RUN dotnet --info && \
dotnet build ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo && \
dotnet test ArchiSteamFarm.Tests -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/source' /nologo && \
dotnet publish ArchiSteamFarm -c "$CONFIGURATION" -f "$NET_CORE_VERSION" -o 'out/publish' /nologo /p:ASFVariant=docker /p:LinkDuringPublish=false && \
cp "ArchiSteamFarm/scripts/generic/ArchiSteamFarm.sh" "ArchiSteamFarm/out/publish/ArchiSteamFarm.sh"
FROM microsoft/dotnet:2.2-runtime-stretch-slim AS runtime
ENV ASPNETCORE_URLS=
LABEL maintainer="JustArchi <[email protected]>"
EXPOSE 1242
WORKDIR /app
COPY --from=build-dotnet /app/ArchiSteamFarm/out/publish .
ENTRYPOINT ["./ArchiSteamFarm.sh", "--no-restart", "--process-required", "--system-required"]