From 67b18e574db6bfe41ec1bcba446f2e86d1013f8d Mon Sep 17 00:00:00 2001 From: soup-bowl Date: Sat, 8 Feb 2025 16:48:04 +0000 Subject: [PATCH] Improved source build efficiency. --- beta/source/Dockerfile | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/beta/source/Dockerfile b/beta/source/Dockerfile index 3ffb419..8b40b26 100644 --- a/beta/source/Dockerfile +++ b/beta/source/Dockerfile @@ -1,16 +1,17 @@ -FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build + +ARG DOTNET_VERSION=8.0 +FROM mcr.microsoft.com/dotnet/sdk:${DOTNET_VERSION} AS build # Cache Bust to avoid caching skipping the latest commit ADD https://api.github.com/repos/opensim/opensim/git/refs/heads/master version.json -RUN git clone https://github.com/opensim/opensim.git /app +RUN git clone --depth 1 --branch master https://github.com/opensim/opensim.git /app WORKDIR /app -RUN git checkout master +RUN rm -rf .git && \ + ./runprebuild.sh && \ + ./compile.sh && \ + rm bin/config-include/storage/SQLiteStandalone.ini -RUN ./runprebuild.sh && ./compile.sh - -RUN rm bin/config-include/storage/SQLiteStandalone.ini - -FROM mcr.microsoft.com/dotnet/runtime:8.0 +FROM mcr.microsoft.com/dotnet/runtime:${DOTNET_VERSION} LABEL org.opencontainers.image.title="OpenSimulator (unofficial)" LABEL org.opencontainers.image.authors="code@soupbowl.io"