diff --git a/.gitea/workflows/publish-release.yml b/.gitea/workflows/publish-release.yml index 5f83003..8986c9c 100644 --- a/.gitea/workflows/publish-release.yml +++ b/.gitea/workflows/publish-release.yml @@ -31,18 +31,15 @@ jobs: run: | dotnet publish "OF DL.Cli/OF DL.Cli.csproj" -p:Version=${{ steps.version.outputs.version }} \ -p:PackageVersion=${{ steps.version.outputs.version }} \ - -p:WarningLevel=0 -c Release -r win-x86 \ - --self-contained true -p:PublishSingleFile=true -o outwin-cli + -p:WarningLevel=0 -c Release -r win-x86 -o outwin-cli dotnet publish "OF DL.Gui/OF DL.Gui.csproj" -p:Version=${{ steps.version.outputs.version }} \ -p:PackageVersion=${{ steps.version.outputs.version }} \ - -p:WarningLevel=0 -c Release -r win-x86 \ - --self-contained true -p:PublishSingleFile=true -o outwin-gui + -p:WarningLevel=0 -c Release -r win-x86 -o outwin-gui dotnet publish "OF DL.Cli/OF DL.Cli.csproj" -p:Version=${{ steps.version.outputs.version }} \ -p:PackageVersion=${{ steps.version.outputs.version }} \ - -p:WarningLevel=0 -c Release -r linux-x64 \ - --self-contained true -p:PublishSingleFile=true -o outlin-cli + -p:WarningLevel=0 -c Release -r linux-x64 -o outlin-cli - name: Copy and patch extra files run: | diff --git a/Dockerfile b/Dockerfile index b7a03ff..10f4193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,17 +11,16 @@ COPY ["OF DL.Gui", "/src/OF DL.Gui"] WORKDIR "/src" # Build release -RUN dotnet publish "OF DL.Gui/OF DL.Gui.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outgui -RUN dotnet publish "OF DL.Cli/OF DL.Cli.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outcli - +RUN dotnet publish "OF DL.Gui/OF DL.Gui.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outgui \ + && dotnet publish "OF DL.Cli/OF DL.Cli.csproj" -p:WarningLevel=0 -p:Version=$VERSION -c Release -o outcli \ # Generate default config.conf files -RUN /src/outcli/OF\ DL.Cli --non-interactive || true && \ + && /src/outcli/OF\ DL.Cli --non-interactive || true && \ # Set download path in default config.conf to /data - sed -e 's/DownloadPath = ""/DownloadPath = "\/data"/' /src/config.conf > /src/updated_config.conf && \ + sed -e 's/DownloadPath = ""/DownloadPath = "\/OF-DL\/data"/' /src/config.conf > /src/updated_config.conf && \ mv /src/updated_config.conf /src/config.conf -FROM mcr.microsoft.com/dotnet/runtime:10.0 AS final +FROM ubuntu:noble AS final # Install dependencies RUN apt-get update \ @@ -34,22 +33,20 @@ RUN apt-get update \ novnc \ npm \ openbox \ - && rm -rf /var/lib/apt/lists/* - -RUN npx playwright install-deps - -RUN apt-get remove --purge -y npm \ - && apt-get autoremove -y - + && npx playwright install-deps \ + && apt-get remove --purge -y npm \ + && apt-get autoremove -y \ + && rm -rf /var/lib/apt/lists/* \ # Redirect webroot to vnc.html instead of displaying directory listing -RUN echo "
" > /usr/share/novnc/index.html - + && echo "" > /usr/share/novnc/index.html \ # Create directories for configuration and downloaded files -RUN mkdir /data /config /config/logs /default-config + && mkdir -p /data /config /config/logs /default-config # Copy release -COPY --from=build /src/outcli /app/cli -COPY --from=build /src/outgui /app/gui +COPY --from=build /src/outgui /app +ARG cli_src="/src/outcli/OF DL.Cli" +ARG cli_target="/app/OF DL.Cli" +COPY --from=build ${cli_src} ${cli_target} # Copy default configuration files COPY --from=build /src/config.conf /default-config diff --git a/OF DL.Cli/OF DL.Cli.csproj b/OF DL.Cli/OF DL.Cli.csproj index 91a1154..3833cff 100644 --- a/OF DL.Cli/OF DL.Cli.csproj +++ b/OF DL.Cli/OF DL.Cli.csproj @@ -7,6 +7,8 @@