Added Dockerfile

This commit is contained in:
Simon Martens
2023-10-27 22:26:24 +02:00
parent 7410db2a89
commit 40f28d4cff
2 changed files with 52 additions and 0 deletions

24
HaWeb/Dockerfile Normal file
View File

@@ -0,0 +1,24 @@
# PREREQUISITES
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
RUN apt update
RUN apt install openssh-server nodejs npm -y
# CLONE & SETUP
RUN git clone https://github.com/Theodor-Springmann-Stiftung/hamann-ausgabe-core.git
RUN mkdir /data/
RUN mkdir /data/hamann/
RUN mkdir /data/xml/
RUN git clone https://github.com/Theodor-Springmann-Stiftung/hamann-xml.git /data/xml/
# COMPILE & PUBLISH
WORKDIR hamann-ausgabe-core/HaWeb/
RUN dotnet restore
RUN npm install
RUN npm run css_build
RUN dotnet publish --no-restore -o /app
# RUN
WORKDIR /app
RUN export DOTNET_ENVIRONMENT="Docker"
RUN dotnet HaWeb.dll
EXPOSE 5000