Menu stuff
This commit is contained in:
@@ -1,40 +1,22 @@
|
||||
# Base image for runtime
|
||||
#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/aspnet:6.0 AS base
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
EXPOSE 443
|
||||
|
||||
RUN mkdir -p /app/build && chmod -R 777 /app/build
|
||||
|
||||
# Leave the ports exposed to allow Unraid to configure them
|
||||
EXPOSE 80 443
|
||||
|
||||
# Image for building the project
|
||||
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
|
||||
WORKDIR /src
|
||||
|
||||
# Copy the .csproj and restore dependencies
|
||||
COPY Aberwyn/Aberwyn.csproj ./
|
||||
RUN dotnet restore
|
||||
|
||||
#COPY Aberwyn/Aberwyn.csproj ./Aberwyn/
|
||||
#WORKDIR /src/Aberwyn
|
||||
#RUN dotnet restore
|
||||
|
||||
|
||||
# Copy everything else and build the app
|
||||
COPY ["Aberwyn/Aberwyn.csproj", "Aberwyn/"]
|
||||
RUN dotnet restore "Aberwyn/Aberwyn.csproj"
|
||||
COPY . .
|
||||
RUN dotnet build Aberwyn.csproj -c Release -o /app/build/
|
||||
WORKDIR "/src/Aberwyn"
|
||||
RUN dotnet build "Aberwyn.csproj" -c Release -o /app/build
|
||||
|
||||
# Publish the app to the /app/publish folder
|
||||
FROM build AS publish
|
||||
RUN dotnet publish Aberwyn.csproj -c Release -o /app/publish
|
||||
RUN dotnet publish "Aberwyn.csproj" -c Release -o /app/publish
|
||||
|
||||
# Use the base runtime image to run the app
|
||||
FROM base AS final
|
||||
WORKDIR /app
|
||||
COPY --from=publish /app/publish .
|
||||
|
||||
# Use environment variable for ports to allow flexibility
|
||||
ENV ASPNETCORE_URLS="http://+:80"
|
||||
|
||||
# Set entry point to start the application
|
||||
ENTRYPOINT ["dotnet", "Aberwyn.dll"]
|
||||
ENTRYPOINT ["dotnet", "Aberwyn.dll"]
|
||||
Reference in New Issue
Block a user