Move to docker image

This commit is contained in:
Robert Marshall 2023-02-16 18:42:13 +00:00
parent 832b4fb36a
commit bb93afd555
5 changed files with 47 additions and 83 deletions

17
Dockerfile Normal file
View file

@ -0,0 +1,17 @@
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build-env
WORKDIR /app
COPY . ./
RUN curl -sL https://deb.nodesource.com/setup_18.x | bash -
RUN apt-get install -y nodejs
RUN chmod +x ./build.sh
RUN ./build.sh
RUN sed -i "s/<AuthEndpoint>/${AuthEndpoint}/g" output/appsettings.json
RUN sed -i "s/<AuthApiKey>/${AuthApiKey}/g" output/appsettings.json
RUN sed -i "s/<BlogEndpoint>/${BlogEndpoint}/g" output/appsettings.json
RUN sed -i "s/<GitEndpoint>/${GitEndpoint}/g" output/appsettings.json
RUN sed -i "s/<MailboxEndpoint>/${MailboxEndpoint}/g" output/appsettings.json
FROM mcr.microsoft.com/dotnet/aspnet:7.0
WORKDIR /app
COPY --from=build-env /app/output .
ENTRYPOINT ["dotnet", "Website.dll"]