From ca9514becc20ac40f21cbc83412aba2c477e7966 Mon Sep 17 00:00:00 2001 From: Lucas Sinn Date: Mon, 19 Aug 2024 13:51:04 +0200 Subject: [PATCH 1/2] tools: build own container with dotnet Signed-off-by: Maximilian Wehinger --- tools/container/Dockerfile | 38 +++++++++++++++++++++++++++++++++++ tools/container/entrypoint.sh | 6 ++++++ 2 files changed, 44 insertions(+) create mode 100644 tools/container/Dockerfile create mode 100644 tools/container/entrypoint.sh diff --git a/tools/container/Dockerfile b/tools/container/Dockerfile new file mode 100644 index 0000000..ab15076 --- /dev/null +++ b/tools/container/Dockerfile @@ -0,0 +1,38 @@ +# Use the base Debian image +FROM debian:bookworm-slim + +# Set environment variable to avoid interactive prompts during package installation +ENV DEBIAN_FRONTEND=noninteractive + +# Install necessary tools and dependencies +RUN apt-get update && apt-get install -y curl wget build-essential procps + +# Add the Microsoft package signing key +RUN wget https://packages.microsoft.com/config/debian/12/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \ + dpkg -i packages-microsoft-prod.deb && \ + rm packages-microsoft-prod.deb + +# Install .NET SDK +RUN apt-get update && apt-get install -y dotnet-sdk-8.0 + +# install specific version of Node.js (20.10.0) and npm +RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ + apt-get install -y nodejs=20.16.0-1nodesource1 && \ + npm install -g npm@10.8.2 + +# # FIXME: Install Wine for running Windows applications +# RUN dpkg --add-architecture i386 && \ +# apt-get update && \ +# apt-get install -y wine wine32 + +# # FIXME: Download and install Inno Setup using Wine +# RUN wget https://jrsoftware.org/download.php/is.exe -O is.exe +# RUN Xvfb :1 & \ +# export DISPLAY=:1 && \ +# wine is.exe /SILENT && \ +# rm is.exe + +COPY *.sh /usr/local/bin/ +RUN chmod a+x /usr/local/bin/*.sh + +ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ] diff --git a/tools/container/entrypoint.sh b/tools/container/entrypoint.sh new file mode 100644 index 0000000..e425f38 --- /dev/null +++ b/tools/container/entrypoint.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +if [ -n "$1" ]; then + exec "$@" +fi +exec /bin/bash -l From 672ef23a5d8d561127022fea0610f94829992c2a Mon Sep 17 00:00:00 2001 From: Lucas Sinn Date: Wed, 14 Aug 2024 16:38:31 +0200 Subject: [PATCH 2/2] ClientApp: add build-unix to package.json Signed-off-by: Maximilian Wehinger --- Binner/Binner.Web/ClientApp/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/Binner/Binner.Web/ClientApp/package.json b/Binner/Binner.Web/ClientApp/package.json index af25e96..457d64e 100644 --- a/Binner/Binner.Web/ClientApp/package.json +++ b/Binner/Binner.Web/ClientApp/package.json @@ -131,6 +131,7 @@ "start": ".\\node_modules\\.bin\\react-app-rewired start", "build-vs": "cd ../../../../../ClientApp && .\\node_modules\\.bin\\react-app-rewired build", "build": ".\\node_modules\\.bin\\react-app-rewired build", + "build-unix": "./node_modules/.bin/react-app-rewired build", "test": "cross-env CI=true cd ../../../../../ClientApp && .\\node_modules\\.bin\\react-app-rewired test --env=jsdom", "eject": "cd ../../../../../ClientApp && .\\node_modules\\.bin\\react-app-rewired eject", "lint": "cd ../../../../../ClientApp && .\\node_modules\\.bin\\eslint ../../src/"