Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce container build #283

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Binner/Binner.Web/ClientApp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down
38 changes: 38 additions & 0 deletions tools/container/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]
6 changes: 6 additions & 0 deletions tools/container/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/sh

if [ -n "$1" ]; then
exec "$@"
fi
exec /bin/bash -l