2022-01-25 17:57:07 +00:00
|
|
|
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
|
|
|
|
WORKDIR /app
|
|
|
|
|
|
|
|
#install npm
|
2023-08-23 14:28:11 +00:00
|
|
|
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash -
|
2022-01-25 17:57:07 +00:00
|
|
|
RUN apt-get install -y nodejs
|
|
|
|
|
|
|
|
#run yarn install
|
2022-03-08 13:08:28 +00:00
|
|
|
COPY . .
|
2023-05-09 13:56:57 +00:00
|
|
|
RUN cd VoidCat/spa \
|
|
|
|
&& npx yarn \
|
|
|
|
&& npx yarn build
|
|
|
|
|
|
|
|
RUN rm -rf VoidCat/appsettings.*.json \
|
|
|
|
&& git config --global --add safe.directory /app \
|
|
|
|
&& dotnet publish -c Release -o out VoidCat/VoidCat.csproj
|
2022-01-25 17:57:07 +00:00
|
|
|
|
|
|
|
# Build runtime image
|
|
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
|
|
|
WORKDIR /app
|
2023-05-09 13:56:57 +00:00
|
|
|
RUN apt update \
|
|
|
|
&& apt install -y --no-install-recommends ffmpeg \
|
|
|
|
&& apt clean \
|
|
|
|
&& rm -rf /var/lib/apt/lists/*
|
2022-01-25 17:57:07 +00:00
|
|
|
COPY --from=build-env /app/out .
|
|
|
|
ENTRYPOINT ["dotnet", "VoidCat.dll"]
|