From 31afafc10f75b32f70c468a74ffaf05c2f51e64a Mon Sep 17 00:00:00 2001 From: Simon Martens Date: Sat, 28 Oct 2023 09:59:38 +0200 Subject: [PATCH] Dockerfile correction & settings --- Dockerfile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2e5c5bf --- /dev/null +++ b/Dockerfile @@ -0,0 +1,23 @@ +# PREREQUISITES +FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build +RUN apt update +RUN apt install openssh-server nodejs npm -y + +# CLONE & SETUP +COPY . . +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 HaWeb/ +RUN dotnet restore +RUN npm install +RUN npm run css_build +RUN dotnet publish --no-restore -o /app + +# RUN +WORKDIR /app +RUN DOTNET_ENVIRONMENT=Docker dotnet HaWeb.dll +EXPOSE 5000