0
0
mirror of https://github.com/sp-tarkov/build.git synced 2025-02-12 20:50:45 -05:00
build/Dockerfile
Refringe 816f791eeb
Changes:
- Removes git directory from container
- Changes all projects to build within a `build` directory
- Adds a combine_builds script that takes the individual project builds and merges them into an `output` directory
- Adds placeholder tag_validate script
- Validates MODULE_DOMAIN env variable
- Updates the Launcher project build to use the `dotnet build` command
- Pins the `dotnet build` command to one thread to prevent Avalonia file access errors on build:
  https://github.com/AvaloniaUI/Avalonia/pull/13840
- Bleeding edge builds are now built as such.

TODO:
- Add additional static project files
- Compress output directory
- Upload release to public folder
- Adapt to work within Drone env
- Adapt build script to work with a dynamic tag value
- Only run project builds when the tag exists in all three projects
2024-02-26 11:15:58 -05:00

34 lines
1.2 KiB
Docker

## This image is configured just as the drone runner image but expected to be run locally for
## rapid development and testing. It is not intended to be used in production.
# Start with the .NET 6.0 SDK Windows Server Core base image
FROM mcr.microsoft.com/dotnet/sdk:6.0-windowsservercore-ltsc2022
# Use PowerShell
SHELL ["powershell", "-Command"]
# Install Chocolatey package manager
RUN Set-ExecutionPolicy Bypass -Scope Process -Force; \
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; \
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Use Chocolatey to install Node.js and Git
RUN choco install nodejs --version=20.10.0 -y
RUN choco install git -y
# Log Versions
RUN node --version
RUN npm --version
RUN git --version
# Copy build scripts into the container
COPY project/build.ps1 /Code/project/
COPY project/build_launcher.ps1 /Code/project/
COPY project/build_modules.ps1 /Code/project/
COPY project/build_server.ps1 /Code/project/
COPY project/combine_builds.ps1 /Code/project/
COPY project/tag_validate.ps1 /Code/project/
# Set the working directory to /Code
WORKDIR /Code