trying docker
This commit is contained in:
26
Dockerfile
Normal file
26
Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
|
||||||
|
# Build stage
|
||||||
|
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN dotnet restore LibraryWeb.csproj
|
||||||
|
RUN dotnet publish -c Release -o /app/publish --no-restore
|
||||||
|
|
||||||
|
# Runtime stage
|
||||||
|
FROM mcr.microsoft.com/dotnet/aspnet:10.0
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
# Listen on all interfaces so Coolify can reach the app
|
||||||
|
ENV ASPNETCORE_URLS=http://+:5656
|
||||||
|
|
||||||
|
# Copy published app from build stage
|
||||||
|
COPY --from=build /app/out .
|
||||||
|
|
||||||
|
# Expose port
|
||||||
|
EXPOSE 5656
|
||||||
|
|
||||||
|
# Start the application
|
||||||
|
ENTRYPOINT ["dotnet", "LibraryWeb.dll"]
|
||||||
Reference in New Issue
Block a user