voidkitty/Dockerfile

23 lines
688 B
Docker
Raw Normal View History

2022-01-25 17:57:07 +00:00
# syntax=docker/dockerfile:1
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build-env
WORKDIR /app
#install npm
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash -
RUN apt-get install -y nodejs
#run yarn install
COPY VoidCat/spa/package.json VoidCat/spa/yarn.lock spa/
RUN cd spa && npx yarn install
# Copy everything else and build
2022-03-08 13:08:28 +00:00
COPY . .
RUN rm -rf VoidCat/appsettings.*.json
RUN 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-01-26 13:49:38 +00:00
RUN apt update && apt install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
2022-01-25 17:57:07 +00:00
COPY --from=build-env /app/out .
ENTRYPOINT ["dotnet", "VoidCat.dll"]