From 7985cb4fc0883115e9887879b13f2a9766c36cd6 Mon Sep 17 00:00:00 2001 From: Nathan Samson Date: Wed, 12 Jul 2017 23:23:15 +0200 Subject: [PATCH] Rework completely --- Dockerfile | 35 ++++++++++++++--------------------- 1 file changed, 14 insertions(+), 21 deletions(-) diff --git a/Dockerfile b/Dockerfile index c403f18..98c3ec6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,24 +1,15 @@ -FROM debian +FROM fedora:25 -RUN apt-get update \ - && apt-get install gnupg wget git -y --no-install-recommends \ - && echo "deb http://download.mono-project.com/repo/debian wheezy main" > /etc/apt/sources.list.d/mono-xamarin.list \ - && wget -qO - http://download.mono-project.com/repo/xamarin.gpg | apt-key add - \ - && apt-get update \ - && apt-get install mono-devel msbuild nuget referenceassemblies-pcl -y --no-install-recommends \ - && apt-get purge wget -y \ - && apt-get autoremove -y \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* /var/tmp/* +RUN dnf install gnupg wget dnf-plugins-core -y \ + && rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" \ + && dnf config-manager --add-repo http://download.mono-project.com/repo/centos7/ \ + && dnf install libzip mono-devel nuget msbuild referenceassemblies-pcl \ + && dnf clean all -RUN apt-get update && \ - apt-get install curl unzip openjdk-8-jdk -y --no-install-recommends && \ - apt-get autoremove -y && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/* /var/tmp/* +RUN dnf install curl unzip java-1.8.0-openjdk-headless java-1.8.0-openjdk-devel -y && \ + dnf clean all RUN mkdir -p /android/sdk && \ - mkdir -p /android/xamarin && \ curl -k https://dl.google.com/android/repository/sdk-tools-linux-3859397.zip -o sdk-tools-linux-3859397.zip && \ unzip -q sdk-tools-linux-3859397.zip -d /android/sdk && \ rm sdk-tools-linux-3859397.zip @@ -28,10 +19,12 @@ RUN cd /android/sdk && \ RUN curl -L https://jenkins.mono-project.com/view/Xamarin.Android/job/xamarin-android-linux/lastSuccessfulBuild/Azure/processDownloadRequest/xamarin-android/oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2.zip \ -o oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2.zip && \ - unzip -q oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2.zip \ - oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2/* \ - -d /android/xamarin && \ - rm oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2.zip + unzip -q oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2.zip && \ + mv oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2 /android/xamarin && \ + ln -s /android/xamarin/bin/Debug/lib/xbuild-frameworks/MonoAndroid/ /usr/lib/mono/xbuild-frameworks/MonoAndroid && \ + rm oss-xamarin.android_v7.3.99.59_Linux-x86_64_master_4799ea2.zip ENV ANDROID_NDK_PATH=/android/sdk/ndk-bundle ENV ANDROID_SDK_PATH=/android/sdk/ +ENV PATH=/android/xamarin/bin/Debug/bin:$PATH +ENV JAVA_HOME=/usr/lib/jvm/java/