dotnet-installer/eng/docker/ubuntu.16.04/Dockerfile
Divino César 57c03e2caf Download blobs from MSRC storage & Add CredProvider to Dockerfiles (#4753)
* Download core-setup files from MSRC storage

Add support for downloading core-setup files from an authenticated endpoint

* Update GenerateLayout.targets

* Adding changes to pass SAS token around

* Add credential provider to Dockerfile's

* Update after PR feedback

* Add comments about approach

* Copy NuGet config variables
2019-10-01 13:22:33 -07:00

65 lines
1.9 KiB
Docker

#
# 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.
RUN rm -rf rm -rf /var/lib/apt/lists/* && \
apt-get clean && \
apt-get update && \
apt-get install -y cmake \
make \
llvm-3.5 \
clang-3.5 \
git \
curl \
tar \
sudo && \
apt-get clean
# Install Build Prereqs
RUN apt-get -qqy install \
debhelper \
build-essential \
devscripts && \
apt-get clean
# Dependencies for CoreCLR and CoreFX
RUN apt-get install -y libunwind8 \
libkrb5-3 \
libicu55 \
liblttng-ust0 \
libssl1.0.0 \
zlib1g \
libuuid1 \
liblldb-3.6 && \
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 working directory
ARG WORK_DIR
WORKDIR ${WORK_DIR}
# Set up Azure Artifacts credential provider.
# We download the installer and execute it using ${USER_ID} so that the installer
# put the NuGet plugins in the correct $HOME/.nuget folder.
RUN curl -O https://raw.githubusercontent.com/Microsoft/artifacts-credprovider/master/helpers/installcredprovider.sh
RUN chmod +x ./installcredprovider.sh
# Set user to the one we just created
USER ${USER_ID}
RUN ./installcredprovider.sh