mirror of
https://github.com/Sanae6/SmoOnlineServer.git
synced 2024-11-21 18:55:17 +00:00
slightly increase docker build
The restore command doesn't need the full source code, but just the .csproj files.
(cherry picked from commit 391d020385
)
This commit is contained in:
parent
472c8856bc
commit
6285abfc4e
2 changed files with 6 additions and 2 deletions
|
@ -5,8 +5,8 @@ FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:6.0 as build
|
||||||
|
|
||||||
WORKDIR /app/
|
WORKDIR /app/
|
||||||
|
|
||||||
COPY ./Server/ ./Server/
|
COPY ./Shared/Shared.csproj ./Shared/Shared.csproj
|
||||||
COPY ./Shared/ ./Shared/
|
COPY ./Server/Server.csproj ./Server/Server.csproj
|
||||||
|
|
||||||
ARG TARGETARCH
|
ARG TARGETARCH
|
||||||
|
|
||||||
|
@ -16,6 +16,9 @@ RUN dotnet restore \
|
||||||
-r debian.11-`echo $TARGETARCH | sed 's@^amd@x@'` \
|
-r debian.11-`echo $TARGETARCH | sed 's@^amd@x@'` \
|
||||||
;
|
;
|
||||||
|
|
||||||
|
COPY ./Shared/ ./Shared/
|
||||||
|
COPY ./Server/ ./Server/
|
||||||
|
|
||||||
# Build application binary
|
# Build application binary
|
||||||
RUN dotnet publish \
|
RUN dotnet publish \
|
||||||
./Server/Server.csproj \
|
./Server/Server.csproj \
|
||||||
|
|
|
@ -6,6 +6,7 @@ services:
|
||||||
#build: .
|
#build: .
|
||||||
#user: 1000:1000
|
#user: 1000:1000
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
|
restart: unless-stopped
|
||||||
ports:
|
ports:
|
||||||
- 1027:1027
|
- 1027:1027
|
||||||
volumes:
|
volumes:
|
||||||
|
|
Loading…
Reference in a new issue