Commit 1e289a96 authored by Maodashu's avatar Maodashu

增加Dockerfile

parent 8a5b5d45
Pipeline #203 canceled with stages
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
\ No newline at end of file
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
EXPOSE 443
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY ["OTWebSocket.API.csproj", "OTWebSocket.API/"]
RUN dotnet restore "OTWebSocket.API/OTWebSocket.API.csproj" -s "http://nuget.matrixone.io:5555/v3/index.json"
COPY . .
WORKDIR "/src/OTWebSocket.API"
RUN dotnet build "OTWebSocket.API.csproj" -c Release -o /app/build --source "http://nuget.matrixone.io:5555/v3/index.json"
FROM build AS publish
RUN dotnet publish "OTWebSocket.API.csproj" -c Release -o /app/publish --no-restore
FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "OTWebSocket.API.dll"]
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment