Created
June 21, 2017 16:13
-
-
Save WilliamBerryiii/b13d060a2d70d55c5b5b86c885ed7dd4 to your computer and use it in GitHub Desktop.
Dockerfile to build .netstandard 2.0 capable bindings for IoT-Edge
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM buildpack-deps:jessie-scm | |
# Install .NET CLI dependencies | |
RUN apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
libc6 \ | |
libcurl3 \ | |
libgcc1 \ | |
libgssapi-krb5-2 \ | |
libicu52 \ | |
liblttng-ust0 \ | |
libssl1.0.0 \ | |
libstdc++6 \ | |
libunwind8 \ | |
libuuid1 \ | |
zlib1g \ | |
&& rm -rf /var/lib/apt/lists/* | |
# Install .NET Core SDK | |
ENV DOTNET_SDK_VERSION 2.0.0-preview1-005977 | |
ENV DOTNET_SDK_DOWNLOAD_URL https://dotnetcli.blob.core.windows.net/dotnet/Sdk/$DOTNET_SDK_VERSION/dotnet-dev-linux-x64.$DOTNET_SDK_VERSION.tar.gz | |
RUN curl -SL $DOTNET_SDK_DOWNLOAD_URL --output dotnet.tar.gz \ | |
&& mkdir -p /usr/share/dotnet \ | |
&& tar -zxf dotnet.tar.gz -C /usr/share/dotnet \ | |
&& rm dotnet.tar.gz \ | |
&& ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet | |
# Trigger the population of the local package cache | |
ENV NUGET_XMLDOC_MODE skip | |
RUN mkdir warmup \ | |
&& cd warmup \ | |
&& dotnet new \ | |
&& cd .. \ | |
&& rm -rf warmup \ | |
&& rm -rf /tmp/NuGetScratch | |
RUN apt-get update | |
RUN apt-get --assume-yes dist-upgrade | |
RUN apt-get --assume-yes install curl build-essential libcurl4-openssl-dev git pkg-config libssl-dev uuid-dev valgrind jq libglib2.0-dev libtool autoconf autogen vim | |
RUN apt-get --assume-yes purge cmake | |
RUN wget http://www.cmake.org/files/v3.8/cmake-3.8.2.tar.gz | |
RUN tar xf cmake-3.8.2.tar.gz | |
WORKDIR ./cmake-3.8.2 | |
RUN ./bootstrap | |
RUN make | |
RUN make install | |
# Checkout code | |
WORKDIR /usr/src/app | |
RUN git clone https://github.com/WilliamBerryiii/iot-edge | |
# Build | |
WORKDIR /usr/src/app/iot-edge/tools | |
RUN ./build.sh --enable-dotnet-core-binding | |
RUN ./build_dotnet_core.sh | |
# RUN | |
WORKDIR /usr/src/app/iot-edge/build/samples/dotnet_core_module_sample | |
ENTRYPOINT ./dotnet_core_module_sample "/usr/src/app/iot-edge/samples/dotnet_core_managed_gateway/dotnet_core_managed_gateway_lin.json" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment