Files
MistoxCom-Blazor-Webassembly/Dockerfile
T
2025-06-19 16:58:19 -07:00

32 lines
711 B
Docker
Executable File

# Build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
WORKDIR /src
# Copy all projects
COPY ["src", "."]
RUN dotnet workload install wasm-tools
RUN apt update
RUN apt install -y python
# Restore the Server
RUN dotnet restore 'MistoxWebsite.Server/MistoxWebsite.Server.csproj'
# Publish
FROM build as publish
RUN dotnet publish 'MistoxWebsite.Server/MistoxWebsite.Server.csproj' -c Release -o /app/publish
# Run the app
FROM mcr.microsoft.com/dotnet/aspnet:9.0
ENV ASPNETCORE_HTTP_PORTS=5001
ENV StripeKey=null
ENV MySQLServer=null
ENV MySQLUser=null
ENV MySQLPass=null
ENV MySQLDatabase=Mistox
EXPOSE 5001
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "MistoxWebsite.Server.dll"]