2x1=10

because numbers are people, too
Persönliches
Fotografie
Programmierung
    • Dockerized .NET Core 1.0.1 and .NET Framework on Mono 4.7

      TLDR; The set­up is avail­able via GitHub and the you can direct­ly pull the sunside/dotnet Dock­er image.

      Three com­po­nents are used in this process:

      • An Ubun­tu Trusty base image that has libuv installed (required for Kestrel)
      • A mono instal­la­tion that sup­ports .NET 4.6.1
      • .NET Core 1.0.1

      Ubun­tu Trusty’s libuv is pret­ty old, so we’re build­ing it from source. The base image is pret­ty straight­for­ward, just use ubuntu:trusty, install the require­ments for build­ing libuv, as well as a bit of can­dy and then imme­di­ate­ly throw away half of the stuff:

      FROM ubuntu:trusty
      
      RUN LIBUV_VERSION=1.9.1 \
      	&& apt-get update \
      	&& apt-get -y install vim-tiny nano curl wget autoconf automake build-essential libtool \
      	&& curl -sSL https://github.com/libuv/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \
      	&& cd /usr/local/src/libuv-$LIBUV_VERSION \
      	&& sh autogen.sh && ./configure && make && make install \
      	&& rm -rf /usr/local/src/libuv-$LIBUV_VERSION \
      	&& ldconfig \
      	&& apt-get -y purge autoconf automake build-essential libtool \
      	&& apt-get -y autoremove \
      	&& apt-get -y clean \
      	&& rm -rf /var/lib/apt/lists/*
      

      Next step is mono. I’m using night­ly builds here, but any mod­ern instal­la­tion would prob­a­bly work. It’s pret­ty straight­for­ward: mono-devel is required to get the sys­tem libraries (oth­er­wise dotnet restore will be unable to restore frameworkDependencies), the rest is the com­pil­er.

      ENV MONO_VERSION 4.7.0.559
      ENV DEBIAN_MONO_VERSION 4.7.0.559-0nightly1
      
      RUN apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF \
      	&& echo "deb http://download.mono-project.com/repo/debian nightly main" > /etc/apt/sources.list.d/mono-nightly.list \
      	&& apt-get update \
      	&& apt-get upgrade -y \
      	&& apt-get install -y mono-runtime=$DEBIAN_MONO_VERSION mono-mcs=$DEBIAN_MONO_VERSION mono-xbuild=$DEBIAN_MONO_VERSION mono-devel=$DEBIAN_MONO_VERSION ca-certificates-mono \
      	&& apt-get -y autoremove \
      	&& apt-get -y clean \
      	&& rm -rf /var/lib/apt/lists/*
      

      Final­ly, .NET Core 1.0.1 and the pre­view tool­ing (dotnet-dev-1.0.0-preview2-003131). This block brings in the tool­ing:

      RUN     apt-get update \
              && apt-get install -y apt-transport-https \
              && echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ trusty main" > /etc/apt/sources.list.d/dotnetdev.list \
              && apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893 \
      	&& apt-get update \
      	&& apt-get install -y dotnet-dev-1.0.0-preview2-003131 \
      	&& apt-get -y autoremove \
      	&& apt-get -y clean \
      	&& rm -rf /var/lib/apt/lists/*
      

      For dock­er ver­sions ear­li­er than 1.11.0, you’d also need an addi­tion­al envi­ron­ment set­ting to pre­vent this bug:

      ENV LTTNG_UST_REGISTER_TIMEOUT 0
      

      In order to pre­vent the “one-time” warmup of the dotnet CLI tool, add

      ENV NUGET_XMLDOC_MODE skip
      RUN mkdir warmup \
          && cd warmup \
          && dotnet new \
          && cd .. \
          && rm -rf warmup
      

      The final and miss­ing clue is this com­ment on GitHub: When build­ing net4xx (i.e. .NET Frame­work tar­gets as opposed to .NET Core), you will run into pret­ty nasty errors stat­ing that System.Native.dll couldn’t be found. Sim­ply patch in a sym­link to the file already installed by .NET Core and you’ll be fine:

      RUN ln -s /usr/share/dotnet/shared/Microsoft.NETCore.App/1.0.1/System.Native.so /usr/lib/libSystem.Native.so && \
          ldconfig
      

      With that, you’re done. Grab the code here or pull the image from the Dock­er Hub using

      docker pull sunside/dotnet:1.0.0-preview2-003131
      
      September 14th, 2016 GMT +2 von
      Markus
      2016-09-14T16:38:07+02:00 2016-09-14T16:44:20+02:00 · 0 Kommentare
      docker Mono
      .NET ASP.NET DNX Core

      Hinterlasse einen Kommentar

      Hier klicken, um das Antworten abzubrechen.

    1. « newer
    2. 1
    3. 2
    4. 3
    5. 4
    6. 5
    7. 6
    8. 7
    9. 8
    10. “Compiler crashed with code 1” on Mono">9
    11. …
    12. 43
    13. older »
    • Kategorien

      • .NET
        • ASP.NET
        • Core
        • DNX
      • Allgemein
      • Android
      • Data Science
      • Embedded
      • FPGA
      • Humor
      • Image Processing
      • Kalman Filter
      • Machine Learning
        • Caffe
        • Hidden Markov Models
        • ML Summarized
        • Neural Networks
        • TensorFlow
      • Mapping
      • MATLAB
      • Robotik
      • Rust
      • Signal Processing
      • Tutorial
      • Version Control
    • Neueste Beiträge

      • Summarized: The E-Dimension — Why Machine Learning Doesn’t Work Well for Some Problems?
      • Use your conda environment in Jupyter Notebooks
      • Building OpenCV for Anaconda Python 3
      • Using TensorFlow’s Supervisor with TensorBoard summary groups
      • Getting an image into and out of TensorFlow
    • Kategorien

      .NET Allgemein Android ASP.NET Caffe Core Data Science DNX Embedded FPGA Hidden Markov Models Humor Image Processing Kalman Filter Machine Learning Mapping MATLAB ML Summarized Neural Networks Robotik Rust Signal Processing TensorFlow Tutorial Version Control
    • Tags

      .NET Accelerometer Anaconda Bitmap Bug Canvas CLR docker FPGA FRDM-KL25Z FRDM-KL26Z Freescale git Gyroscope Integration Drift Intent J-Link Linear Programming Linux Magnetometer Matlab Mono Naismith OpenCV Open Intents OpenSDA Optimization Pipistrello Player/Stage PWM Python Sensor Fusion Simulink Spartan 6 svn tensorflow Tilt Compensation TRIAD ubuntu Windows Xilinx Xilinx SDK ZedBoard ZYBO Zynq
    • Letzte Kommetare

      • Lecke Mio bei Frequency-variable PWM generator in Simulink
      • Vaibhav bei Use your conda environment in Jupyter Notebooks
      • newbee bei Frequency-variable PWM generator in Simulink
      • Markus bei Using TensorFlow’s Supervisor with TensorBoard summary groups
      • Toke bei Using TensorFlow’s Supervisor with TensorBoard summary groups
    • Blog durchsuchen

    • September 2016
      M D M D F S S
      « Dez   Dez »
       1234
      567891011
      12131415161718
      19202122232425
      2627282930  
    • Self

      • Find me on GitHub
      • Google+
      • Me on Stack­Ex­change
      • Ye olde blog
    • Meta

      • Anmelden
      • Beitrags-Feed (RSS)
      • Kommentare als RSS
      • WordPress.org
    (Generiert in 0,440 Sekunden)

    Zurück nach oben.