mirror of
https://git.v0l.io/Kieran/void.cat.git
synced 2025-03-18 13:12:23 +01:00
23 lines
688 B
Docker
23 lines
688 B
Docker
# 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
|
|
COPY . .
|
|
RUN rm -rf VoidCat/appsettings.*.json
|
|
RUN dotnet publish -c Release -o out VoidCat/VoidCat.csproj
|
|
|
|
# Build runtime image
|
|
FROM mcr.microsoft.com/dotnet/aspnet:6.0
|
|
WORKDIR /app
|
|
RUN apt update && apt install -y --no-install-recommends ffmpeg && rm -rf /var/lib/apt/lists/*
|
|
COPY --from=build-env /app/out .
|
|
ENTRYPOINT ["dotnet", "VoidCat.dll"] |