2016-05-26 19:48:16 +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.
|
|
|
|
#
|
|
|
|
|
|
|
|
FROM ubuntu:16.04
|
|
|
|
|
|
|
|
# Install the base toolchain we need to build anything (clang, cmake, make and the like)
|
|
|
|
# this does not include libraries that we need to compile different projects, we'd like
|
|
|
|
# them in a different layer.
|
2016-06-02 21:47:35 +00:00
|
|
|
RUN rm -rf rm -rf /var/lib/apt/lists/* && \
|
|
|
|
apt-get clean && \
|
2016-05-26 19:48:16 +00:00
|
|
|
apt-get update && \
|
|
|
|
apt-get install -y cmake \
|
|
|
|
make \
|
|
|
|
llvm-3.5 \
|
|
|
|
clang-3.5 \
|
2016-06-02 21:47:35 +00:00
|
|
|
git \
|
2016-05-26 19:48:16 +00:00
|
|
|
curl \
|
|
|
|
tar \
|
2016-06-02 21:47:35 +00:00
|
|
|
sudo && \
|
|
|
|
apt-get clean
|
2016-05-26 19:48:16 +00:00
|
|
|
|
2016-06-14 17:56:08 +00:00
|
|
|
# Install Build Prereqs
|
|
|
|
RUN apt-get -qqy install \
|
|
|
|
debhelper \
|
|
|
|
build-essential \
|
|
|
|
devscripts && \
|
|
|
|
apt-get clean
|
|
|
|
|
2016-05-26 19:48:16 +00:00
|
|
|
# Dependencies for CoreCLR and CoreFX
|
2016-06-02 21:47:35 +00:00
|
|
|
RUN apt-get install -y libunwind8 \
|
|
|
|
libkrb5-3 \
|
|
|
|
libicu55 \
|
|
|
|
liblttng-ust0 \
|
|
|
|
libssl1.0.0 \
|
|
|
|
zlib1g \
|
2016-06-14 02:08:54 +00:00
|
|
|
libuuid1 \
|
|
|
|
liblldb-3.6 && \
|
2016-05-26 19:48:16 +00:00
|
|
|
apt-get clean
|
|
|
|
|
|
|
|
# Setup User to match Host User, and give superuser permissions
|
|
|
|
ARG USER_ID=0
|
|
|
|
RUN useradd -m code_executor -u ${USER_ID} -g sudo
|
|
|
|
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
|
|
|
|
# With the User Change, we need to change permissions on these directories
|
|
|
|
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}
|
|
|
|
|
|
|
|
# Set working directory
|
2016-06-02 21:47:35 +00:00
|
|
|
WORKDIR /opt/code
|