From b49d6e8ad6011f22e50b3ad2c6f06e20356bc8cb Mon Sep 17 00:00:00 2001 From: Michele Date: Sun, 17 Jan 2021 22:24:14 +0000 Subject: [PATCH] fix drone compilation --- .drone.yml | 1 + BaseCompileImage/Dockerfile | 42 +++++++++++++++++++++++++------------ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/.drone.yml b/.drone.yml index 5989617..9484e36 100644 --- a/.drone.yml +++ b/.drone.yml @@ -11,6 +11,7 @@ steps: - name: frontend image: privateregistry.michelescandura.com/michele/basecompileimage + pull: true volumes: - name: cache path: /release diff --git a/BaseCompileImage/Dockerfile b/BaseCompileImage/Dockerfile index 56d98f7..b48f7c8 100644 --- a/BaseCompileImage/Dockerfile +++ b/BaseCompileImage/Dockerfile @@ -4,26 +4,42 @@ RUN export DEBIAN_FRONTEND=noninteractive \ && apt-get install -y --no-install-recommends \ wget \ ca-certificates \ - \ + gnupg \ + software-properties-common \ + p7zip-full \ + xvfb \ + curl \ # Install Microsoft package feed && wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb \ && dpkg -i packages-microsoft-prod.deb \ - && rm packages-microsoft-prod.deb \ - \ + && rm packages-microsoft-prod.deb + # Install .NET - && apt-get update \ +RUN apt-get update \ && apt-get install -y --no-install-recommends \ - apt-transport-https \ + apt-transport-https \ dotnet-sdk-5.0 \ dotnet-sdk-3.1 \ libpng16-16 \ - libnvtt-dev \ - \ + libnvtt-dev - # Install Wine - && apt install -y --no-install-recommends wine64 p7zip-full \ - && wget -qO- https://raw.githubusercontent.com/MonoGame/MonoGame/develop/Tools/MonoGame.Effect.Compiler/mgfxc_wine_setup.sh | bash \ - # Cleanup - && rm -rf /var/lib/apt/lists/* +RUN dpkg --add-architecture i386 +# && apt-get install --no-install-recommends -y gnupg software-properties-common p7zip-full xvfb curl -RUN dotnet tool install -g dotnet-mgcb +RUN wget -qO- https://dl.winehq.org/wine-builds/winehq.key | apt-key add - \ + && apt-add-repository 'deb http://dl.winehq.org/wine-builds/ubuntu/ focal main' \ + && wget -qO- https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/Release.key | apt-key add - \ + && sh -c 'echo "deb https://download.opensuse.org/repositories/Emulators:/Wine:/Debian/xUbuntu_18.04/ ./" > /etc/apt/sources.list.d/obs.list' + +RUN apt-get update \ + && apt-get install --install-recommends -y winehq-stable + +RUN wget -qO- https://raw.githubusercontent.com/MonoGame/MonoGame/develop/Tools/MonoGame.Effect.Compiler/mgfxc_wine_setup.sh | xvfb-run sh + +RUN rm -rf /var/lib/apt/lists/* + +ENV MGFXC_WINE_PATH=/root/.winemonogame/ + +RUN apt-get remove -y xvfb p7zip-full gnupg curl \ + && apt-get autoremove -y \ + && apt-get autoclean -y