This repository has been archived by the owner on Jul 17, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 170
/
Dockerfile
184 lines (163 loc) · 6.24 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
FROM microsoft/vsts-agent:ubuntu-14.04
# Install basic command-line utilities
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
curl \
dnsutils \
file \
ftp \
iproute2 \
iputils-ping \
openssh-client \
sudo \
telnet \
time \
unzip \
wget \
zip \
tzdata \
&& rm -rf /var/lib/apt/lists/*
# Install essential build tools
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
build-essential \
&& rm -rf /var/lib/apt/lists/*
# Install Azure CLI (instructions taken from https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)
RUN echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ wheezy main" | tee /etc/apt/sources.list.d/azure-cli.list \
&& apt-key adv --keyserver packages.microsoft.com --recv-keys 52E16F86FEE04B979B07E28DB02C46DF417A0893 \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
azure-cli \
&& rm -rf /var/lib/apt/lists/*
# Install Clang (only appears to work on xenial)
RUN [ "trusty" = "xenial" ] \
&& wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - \
&& apt-add-repository "deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-6.0 main" \
&& apt-get update \
&& apt-get install -y --no-install-recommends clang-6.0 \
&& rm -rf /var/lib/apt/lists/* \
|| echo -n
# Install CMake
RUN curl -sL https://cmake.org/files/v3.10/cmake-3.10.2-Linux-x86_64.sh -o cmake.sh \
&& chmod +x cmake.sh \
&& ./cmake.sh --prefix=/usr/local --exclude-subdir \
&& rm cmake.sh
# Install Go
RUN curl -sL https://dl.google.com/go/go1.9.4.linux-amd64.tar.gz -o go1.9.4.linux-amd64.tar.gz \
&& mkdir -p /usr/local/go1.9.4 \
&& tar -C /usr/local/go1.9.4 -xzf go1.9.4.linux-amd64.tar.gz --strip-components=1 go \
&& rm go1.9.4.linux-amd64.tar.gz
RUN curl -sL https://dl.google.com/go/go1.10.linux-amd64.tar.gz -o go1.10.linux-amd64.tar.gz \
&& mkdir -p /usr/local/go1.10 \
&& tar -C /usr/local/go1.10 -xzf go1.10.linux-amd64.tar.gz --strip-components=1 go \
&& rm go1.10.linux-amd64.tar.gz
ENV GOROOT_1_9_X64=/usr/local/go1.9.4 \
GOROOT_1_10_X64=/usr/local/go1.10 \
GOROOT=/usr/local/go1.10
ENV PATH $PATH:$GOROOT/bin
# Install HHVM
RUN apt-get update \
&& apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xB4112585D386EB94 \
&& add-apt-repository https://dl.hhvm.com/ubuntu \
&& apt-get update \
&& apt-get install -y hhvm \
&& rm -rf /var/lib/apt/lists/*
# Install OpenJDKs
RUN apt-add-repository -y ppa:openjdk-r/ppa
RUN apt-get update \
&& apt-get install -y --no-install-recommends openjdk-7-jdk \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get install -y --no-install-recommends openjdk-8-jdk \
&& rm -rf /var/lib/apt/lists/*
RUN apt-get update \
&& apt-get -o Dpkg::Options::="--force-overwrite" install -y --no-install-recommends openjdk-8-jdk \
&& rm -rf /var/lib/apt/lists/*
RUN update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
ENV JAVA_HOME_7_X64=/usr/lib/jvm/java-7-openjdk-amd64 \
JAVA_HOME_8_X64=/usr/lib/jvm/java-8-openjdk-amd64 \
JAVA_HOME_8_X64=/usr/lib/jvm/java-8-openjdk-amd64 \
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64 \
JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
# Install Java Tools (Ant, Gradle, Maven)
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
ant \
ant-optional \
&& rm -rf /var/lib/apt/lists/*
RUN curl -sL https://services.gradle.org/distributions/gradle-4.6-bin.zip -o gradle-4.6.zip \
&& unzip -d /usr/share gradle-4.6.zip \
&& ln -s /usr/share/gradle-4.6/bin/gradle /usr/bin/gradle \
&& rm gradle-4.6.zip
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
maven \
&& rm -rf /var/lib/apt/lists/*
ENV ANT_HOME=/usr/share/ant \
GRADLE_HOME=/usr/share/gradle \
M2_HOME=/usr/share/maven
# Install MySQL Client
RUN apt-get update \
&& apt-get install mysql-client -y \
&& rm -rf /var/lib/apt/lists/*
ENV mysql=/usr/bin/mysql
# Install .NET Core SDK and initialize package cache
RUN curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > /etc/apt/trusted.gpg.d/microsoft.gpg \
&& echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-trusty-prod trusty main" > /etc/apt/sources.list.d/dotnetdev.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
dotnet-sdk-2.1.101 \
&& rm -rf /var/lib/apt/lists/*
RUN dotnet help
ENV dotnet=/usr/bin/dotnet
# Install AzCopy (depends on .NET Core)
RUN apt-get update \
&& apt-get install -y --no-install-recommends azcopy \
&& rm -rf /var/lib/apt/lists/*
# Install LTS Node.js and related build tools
RUN curl -sL https://git.io/n-install | bash -s -- -ny - \
&& ~/n/bin/n lts \
&& npm install -g bower grunt gulp n \
&& rm -rf ~/n
ENV bower=/usr/local/bin/bower \
grunt=/usr/local/bin/grunt
# Install Powershell Core
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/ubuntu/14.04/prod.list | tee /etc/apt/sources.list.d/microsoft.list \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
powershell \
&& rm -rf /var/lib/apt/lists/*
# Install Python
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python \
python-pip \
python3 \
python3-pip \
&& rm -rf /var/lib/apt/lists/*
# Install Ruby requirements
RUN apt-get update \
&& apt-get install -y libz-dev openssl libssl-dev
# Install Scala build tools
RUN curl -s https://raw.githubusercontent.com/paulp/sbt-extras/master/sbt > /usr/local/bin/sbt \
&& chmod 0755 /usr/local/bin/sbt
# Install Subversion
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
subversion \
&& rm -rf /var/lib/apt/lists/*
# Download hosted tool cache
ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
RUN azcopy --recursive --source https://vstsagenttools.blob.core.windows.net/tools/hostedtoolcache/linux --destination $AGENT_TOOLSDIRECTORY
# Install the tools from the hosted tool cache
RUN original_directory=$PWD \
&& setups=$(find $AGENT_TOOLSDIRECTORY -name setup.sh) \
&& for setup in $setups; do \
chmod +x $setup; \
cd $(dirname $setup); \
./$(basename $setup); \
cd $original_directory; \
done;