Added container helper to compose. Updated dockerfile to use bun. Smaller adjustments

This commit is contained in:
2026-02-09 10:53:01 +01:00
parent 4401d67f2d
commit a4c59b23db
3 changed files with 56 additions and 16 deletions

View File

@@ -4,7 +4,9 @@
FROM mcr.microsoft.com/dotnet/sdk:10.0 AS build
# Install required packages
RUN apt-get update; apt-get install nodejs npm -y; apt-get clean
RUN apt-get update; apt-get install unzip -y; apt-get clean
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
#
# Build & publish projects
@@ -24,13 +26,13 @@ RUN git clone -b $GIT_BRANCH --single-branch $GIT_REPOSITORY .
# Save hash of commit
WORKDIR /src
RUN mkdir -p "/output" && git log -1 --pretty=format:"%H" > /output/version
RUN mkdir -p "/output" && echo -n $GIT_BRANCH > /output/version
# TODO: Implement plugin loading here
# Install npm packages
WORKDIR /src/Hosts/Moonlight.Frontend.Host/Styles
RUN npm install
RUN bun install
# Install nuget packages
WORKDIR /src
@@ -43,7 +45,7 @@ WORKDIR "/src/Hosts/Moonlight.Frontend.Host"
RUN dotnet build --no-restore "./Moonlight.Frontend.Host.csproj" -c $BUILD_CONFIGURATION -o /output/build-frontend
WORKDIR "/src/Hosts/Moonlight.Frontend.Host/Styles"
RUN npm run build
RUN bun run build
# Build projects
WORKDIR "/src/Hosts/Moonlight.Api.Host"