azure-sdk-for-cpp/Dockerfile
George Arama 9d1ede92ec
Prototype build from source (#3180)
* prepPR

* gitignore updates

* cspell.json

* spell

* cspell typo

* deisable option

* need to look out for this

* reenable tests

* set unset location properly

* building in docker

* format file

* final changes

* PR comments

* update git ignore

* test cmake build

* test 2

* ren steps

* test new step

* try again

* again

* oops

* try again

* put back

* test2

* test5_46

* progress

* more again

* test6_35

* test 6_55

* test_again

* move up

* test

* output params

* try try again

* one more test

* put back curl

* os

* run only on one

* try again

* typo

* switch variable

* set things back

* set things back

* prep for next step

* test source deps new

* try again

* try try again

* typo

* test rewire

* params

* typo

* fix

* get rid of vcpkg

* linux

* mac

* try brew

* try exports

* try again

* typo

* set env

* include dir

* root

* try again

* typo

* dfsfsda

* try agan

* try again

* oops

* sdfsd

* typo

* dsdsad

* hghhg

* update env

* ghhgj

* sAdsad

* try again

* fdfd

* rewrew

* dsadas

* sdasda

* ggggg

* envs2

* envs3

* typo

* order

* try again

* make sure we don't blow up other pipelines

* typo

* typo

* fsdfs

* check null

* put back
2022-01-14 13:06:00 -08:00

80 lines
2.4 KiB
Docker

FROM debian:10
# This Dockerfile adds a non-root 'vscode' user with sudo access. However, for Linux,
# this user's GID/UID must match your local user UID/GID to avoid permission issues
# with bind mounts. Update USER_UID / USER_GID if yours is not 1000. See
# https://aka.ms/vscode-remote/containers/non-root-user for details.
ARG USERNAME=azure-sdk-for-cpp
ARG USER_UID=1000
ARG USER_GID=$USER_UID
ARG PORT=4000
# Install packages as root
USER root
# Install needed packages and setup non-root user. Use a separate RUN statement to add your own dependencies.
RUN apt-get update \
&& export DEBIAN_FRONTEND=noninteractive \
&& LANG=C LC_ALL=C apt-get -y install --no-install-recommends \
apt-utils \
dialog \
sudo \
#
# Install vim, git, process tools, lsb-release
git \
openssh-client \
less \
#
# Azure SDK for C++ dev env
make \
#cmake \
ninja-build \
build-essential \
zlib1g-dev \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
gdb \
# clang format 10 req
gnupg2 \
wget \
ca-certificates \
# vcpkg reqs
curl \
zip \
unzip \
tar \
pkg-config \
#
# Add en_US.UTF-8 locale
&& echo 'en_US.UTF-8 UTF-8' >> /etc/locale.gen \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - \
&& echo 'deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' | tee -a /etc/apt/sources.list \
&& echo 'deb-src http://apt.llvm.org/bionic/ llvm-toolchain-bionic-10 main' | tee -a /etc/apt/sources.list \
&& apt-get update \
&& apt-get -y install --no-install-recommends clang-format-10 \
#
# Create a non-root user to use if preferred - see https://aka.ms/vscode-remote/containers/non-root-user.
&& groupadd --gid $USER_GID $USERNAME \
&& useradd -s /bin/bash --uid $USER_UID --gid $USER_GID -m $USERNAME \
#
# Add sudo support for the non-root user
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME\
&& chmod 0440 /etc/sudoers.d/$USERNAME \
#
# Clean up
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN wget https://github.com/Kitware/CMake/releases/download/v3.20.2/cmake-3.20.2.tar.gz \
&& tar -zxvf cmake-3.20.2.tar.gz \
&& cd cmake-3.20.2 \
&& ./bootstrap \
&& make \
&& make install
# Switch back to the non-root user
USER ${USERNAME}