2015-11-16 19:21:57 +00:00
|
|
|
#
|
|
|
|
# Copyright (c) .NET Foundation and contributors. All rights reserved.
|
|
|
|
# Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
|
|
#
|
|
|
|
|
2015-10-20 16:05:17 +00:00
|
|
|
# Dockerfile that creates a container suitable to build dotnet-cli
|
2015-12-16 02:15:31 +00:00
|
|
|
FROM ubuntu:14.04
|
2015-10-20 16:05:17 +00:00
|
|
|
|
2016-02-23 23:27:03 +00:00
|
|
|
# Misc Dependencies for build
|
|
|
|
RUN apt-get update && apt-get -qqy install curl unzip gettext sudo
|
|
|
|
|
2015-10-29 17:02:14 +00:00
|
|
|
# This could become a "microsoft/coreclr" image, since it just installs the dependencies for CoreCLR (and stdlib)
|
2016-02-23 23:27:03 +00:00
|
|
|
RUN echo "deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.6 main" | tee /etc/apt/sources.list.d/llvm.list && \
|
|
|
|
curl http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add - && \
|
|
|
|
apt-get update && apt-get -qqy install\
|
|
|
|
libc6 \
|
|
|
|
libedit2 \
|
|
|
|
libffi6 \
|
|
|
|
libgcc1 \
|
|
|
|
libicu52 \
|
|
|
|
liblldb-3.6 \
|
|
|
|
libllvm3.6 \
|
|
|
|
liblttng-ust0 \
|
|
|
|
liblzma5 \
|
|
|
|
libncurses5 \
|
|
|
|
libpython2.7 \
|
|
|
|
libstdc++6 \
|
|
|
|
libtinfo5 \
|
|
|
|
libunwind8 \
|
|
|
|
liburcu1 \
|
|
|
|
libuuid1 \
|
|
|
|
zlib1g \
|
|
|
|
libasn1-8-heimdal \
|
|
|
|
libcomerr2 \
|
|
|
|
libcurl3 \
|
|
|
|
libgcrypt11 \
|
|
|
|
libgnutls26 \
|
|
|
|
libgpg-error0 \
|
|
|
|
libgssapi3-heimdal \
|
|
|
|
libgssapi-krb5-2 \
|
|
|
|
libhcrypto4-heimdal \
|
|
|
|
libheimbase1-heimdal \
|
|
|
|
libheimntlm0-heimdal \
|
|
|
|
libhx509-5-heimdal \
|
|
|
|
libidn11 \
|
|
|
|
libk5crypto3 \
|
|
|
|
libkeyutils1 \
|
|
|
|
libkrb5-26-heimdal \
|
|
|
|
libkrb5-3 \
|
|
|
|
libkrb5support0 \
|
|
|
|
libldap-2.4-2 \
|
|
|
|
libp11-kit0 \
|
|
|
|
libroken18-heimdal \
|
|
|
|
librtmp0 \
|
|
|
|
libsasl2-2 \
|
|
|
|
libsqlite3-0 \
|
|
|
|
libssl1.0.0 \
|
|
|
|
libtasn1-6 \
|
|
|
|
libwind0-heimdal
|
2015-12-16 02:15:31 +00:00
|
|
|
|
|
|
|
# Install Dotnet CLI dependencies.
|
|
|
|
# clang is required for dotnet-compile-native
|
|
|
|
RUN apt-get -qqy install clang-3.5
|
2015-10-22 06:41:38 +00:00
|
|
|
|
2015-10-21 22:21:14 +00:00
|
|
|
# Install Build Prereqs
|
2016-02-23 23:27:03 +00:00
|
|
|
RUN apt-get -qq install -y debhelper build-essential devscripts git cmake
|
2015-10-21 22:21:14 +00:00
|
|
|
|
|
|
|
# Use clang as c++ compiler
|
2015-12-16 02:15:31 +00:00
|
|
|
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-3.5 100
|
|
|
|
RUN update-alternatives --set c++ /usr/bin/clang++-3.5
|
2015-10-20 16:05:17 +00:00
|
|
|
|
2015-11-17 08:45:49 +00:00
|
|
|
# Setup User to match Host User, and give superuser permissions
|
|
|
|
ARG USER_ID=0
|
2015-12-01 19:23:13 +00:00
|
|
|
RUN useradd -m code_executor -u ${USER_ID} -g sudo
|
2015-11-17 08:45:49 +00:00
|
|
|
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
|
2016-02-23 23:27:03 +00:00
|
|
|
# With the User Change, we need to change permissions on these directories
|
2015-11-17 08:45:49 +00:00
|
|
|
RUN chmod -R a+rwx /usr/local
|
|
|
|
RUN chmod -R a+rwx /home
|
|
|
|
RUN chmod -R 755 /usr/lib/sudo
|
|
|
|
|
|
|
|
# Set user to the one we just created
|
|
|
|
USER ${USER_ID}
|
|
|
|
|
2015-10-20 16:05:17 +00:00
|
|
|
# Set working directory
|
|
|
|
WORKDIR /opt/code
|