File tree Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Expand file tree Collapse file tree 3 files changed +37
-3
lines changed Original file line number Diff line number Diff line change 1+ # Build stage
2+ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
3+ WORKDIR /src
4+ COPY json-vb.sln ./
5+ COPY API/API.vbproj ./API/
6+ COPY JsonParser/JsonParser.vbproj ./JsonParser/
7+ RUN dotnet restore "API/API.vbproj"
8+
9+ COPY API/. ./API/
10+ COPY JsonParser/. ./JsonParser/
11+ RUN dotnet publish "API/API.vbproj" -c Release -o /app/publish
12+
13+ # Runtime stage
14+ FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS final
15+ WORKDIR /app
16+ COPY --from=build /app/publish .
17+ EXPOSE 8000
18+ ENV ASPNETCORE_URLS=http://0.0.0.0:8000
19+ ENTRYPOINT ["dotnet" , "API.dll" ]
Original file line number Diff line number Diff line change @@ -15,11 +15,9 @@ Module Program
1515
1616 Sub Main(args As String ())
1717 Dim builder = WebApplication.CreateBuilder(args)
18- builder.WebHost.UseUrls( "http://localhost:8000" , "https://localhost:8001" )
19- Dim app = builder.Build()
2018
19+ Dim app = builder.Build()
2120 app.MapPost( "/api/v1/parse" , AddressOf HandleParseAsync)
22-
2321 app.Run()
2422 End Sub
2523
Original file line number Diff line number Diff line change 1+ # Build stage
2+ FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
3+ WORKDIR /src
4+ COPY json-vb.sln ./
5+ COPY CLI/CLI.vbproj ./CLI/
6+ COPY JsonParser/JsonParser.vbproj ./JsonParser/
7+ RUN dotnet restore "CLI/CLI.vbproj"
8+
9+ COPY CLI/. ./CLI/
10+ COPY JsonParser/. ./JsonParser/
11+ RUN dotnet publish "CLI/CLI.vbproj" -c Release -o /app/publish
12+
13+ # Runtime stage
14+ FROM mcr.microsoft.com/dotnet/runtime:8.0-alpine AS final
15+ WORKDIR /app
16+ COPY --from=build /app/publish .
17+ ENTRYPOINT ["dotnet" , "CLI.dll" ]
You can’t perform that action at this time.
0 commit comments