-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile
34 lines (25 loc) · 1.04 KB
/
Dockerfile
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
29
30
31
32
33
34
# https://hub.docker.com/_/microsoft-dotnet
FROM mcr.microsoft.com/dotnet/sdk:9.0-alpine AS build
WORKDIR /source
COPY SignalR.Protobuf/SignalR.Protobuf.csproj SignalR.Protobuf/
RUN dotnet restore SignalR.Protobuf/SignalR.Protobuf.csproj -r linux-musl-x64
COPY MusicX.Shared/MusicX.Shared.csproj MusicX.Shared/
RUN dotnet restore MusicX.Shared/MusicX.Shared.csproj -r linux-musl-x64
COPY MusicX.Server/MusicX.Server.csproj MusicX.Server/
RUN dotnet restore MusicX.Server/MusicX.Server.csproj -r linux-musl-x64
COPY . .
WORKDIR /source/MusicX.Server
RUN dotnet publish -c release -o /app -r linux-musl-x64 --self-contained false --no-restore
# final stage/image
FROM mcr.microsoft.com/dotnet/aspnet:9.0-alpine-amd64
WORKDIR /app
COPY --from=build /app ./
# See: https://github.com/dotnet/announcements/issues/20
# Uncomment to enable globalization APIs (or delete)
# ENV \
# DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
# LC_ALL=en_US.UTF-8 \
# LANG=en_US.UTF-8
# RUN apk add --no-cache icu-libs
RUN mkdir files
ENTRYPOINT ["./MusicX.Server"]