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
|
2016-01-08 02:50:00 +00:00
|
|
|
FROM centos:7.1.1503
|
|
|
|
|
|
|
|
RUN yum -q -y install deltarpm
|
|
|
|
RUN yum -q -y install epel-release
|
|
|
|
# RUN yum -y update
|
2015-10-20 16:05:17 +00:00
|
|
|
|
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)
|
2015-12-16 02:15:31 +00:00
|
|
|
# Install CoreCLR and CoreFx dependencies
|
2016-01-08 02:50:00 +00:00
|
|
|
RUN yum -q -y install unzip libunwind gettext libcurl-devel openssl-devel zlib libicu-devel
|
2015-12-16 02:15:31 +00:00
|
|
|
|
2016-01-08 02:50:00 +00:00
|
|
|
# RUN apt-get update && \
|
|
|
|
# apt-get -qqy install unzip curl libicu-dev libunwind8 gettext libssl-dev libcurl3-gnutls zlib1g liblttng-ust-dev lldb-3.6-dev lldb-3.6
|
2015-10-22 06:41:38 +00:00
|
|
|
|
2015-10-21 22:21:14 +00:00
|
|
|
# Install Build Prereqs
|
2016-03-10 01:28:22 +00:00
|
|
|
# CMake 3.3.2 from GhettoForge; LLVM 3.6.2 built from source ourselves;
|
|
|
|
RUN yum install -y http://mirror.symnds.com/distributions/gf/el/7/plus/x86_64/cmake-3.3.2-1.gf.el7.x86_64.rpm \
|
|
|
|
https://matell.blob.core.windows.net/rpms/clang-3.6.2-1.el7.centos.x86_64.rpm \
|
|
|
|
https://matell.blob.core.windows.net/rpms/clang-libs-3.6.2-1.el7.centos.x86_64.rpm \
|
|
|
|
https://matell.blob.core.windows.net/rpms/lldb-3.6.2-1.el7.centos.x86_64.rpm \
|
|
|
|
https://matell.blob.core.windows.net/rpms/lldb-devel-3.6.2-1.el7.centos.x86_64.rpm \
|
|
|
|
https://matell.blob.core.windows.net/rpms/llvm-3.6.2-1.el7.centos.x86_64.rpm \
|
|
|
|
https://matell.blob.core.windows.net/rpms/llvm-libs-3.6.2-1.el7.centos.x86_64.rpm \
|
|
|
|
which \
|
|
|
|
make
|
|
|
|
|
|
|
|
RUN yum -q -y install tar git
|
2015-10-21 22:21:14 +00:00
|
|
|
|
|
|
|
# Use clang as c++ compiler
|
2016-01-08 02:50:00 +00:00
|
|
|
RUN update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++ 100
|
|
|
|
RUN update-alternatives --set c++ /usr/bin/clang++
|
2015-10-20 16:05:17 +00:00
|
|
|
|
2016-01-08 02:50:00 +00:00
|
|
|
RUN yum -q -y install sudo
|
2015-11-17 08:45:49 +00:00
|
|
|
|
|
|
|
# Setup User to match Host User, and give superuser permissions
|
|
|
|
ARG USER_ID=0
|
2016-01-08 02:50:00 +00:00
|
|
|
RUN useradd -m code_executor -u ${USER_ID} -g root
|
2015-11-17 08:45:49 +00:00
|
|
|
RUN echo 'code_executor ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
|
|
|
|
|
|
|
|
# With the User Change, we need to change permssions on these directories
|
|
|
|
RUN chmod -R a+rwx /usr/local
|
|
|
|
RUN chmod -R a+rwx /home
|
2016-01-08 02:50:00 +00:00
|
|
|
RUN chmod -R 755 /usr/bin/sudo
|
2015-11-17 08:45:49 +00:00
|
|
|
|
|
|
|
# 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
|