10
10
# See the License for the specific language governing permissions and limitations under the License.
11
11
12
12
FROM public.ecr.aws/amazonlinux/amazonlinux:2 AS core
13
+ {{{ imagebuilder:environments }}}
14
+ {{{ imagebuilder:components }}}
13
15
14
16
# Install git, SSH, and other utilities
15
17
RUN set -ex \
16
18
&& yum install -yq openssh-clients \
17
19
&& mkdir ~/.ssh \
18
20
&& touch ~/.ssh/known_hosts \
19
- && ssh-keyscan -t rsa,dsa -H github.com >> ~/.ssh/known_hosts \
20
- && ssh-keyscan -t rsa,dsa -H bitbucket.org >> ~/.ssh/known_hosts \
21
+ && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H github.com >> ~/.ssh/known_hosts \
22
+ && ssh-keyscan -t rsa,dsa,ed25519,ecdsa -H bitbucket.org >> ~/.ssh/known_hosts \
21
23
&& chmod 600 ~/.ssh/known_hosts \
22
24
&& amazon-linux-extras install epel -y \
23
25
&& rpm --import https://download.mono-project.com/repo/xamarin.gpg \
@@ -47,7 +49,7 @@ FROM core AS tools
47
49
48
50
# Install Git
49
51
RUN set -ex \
50
- && GIT_VERSION=2.27.0 \
52
+ && GIT_VERSION=2.39.1 \
51
53
&& GIT_TAR_FILE=git-$GIT_VERSION.tar.gz \
52
54
&& GIT_SRC=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz \
53
55
&& curl -L -o $GIT_TAR_FILE $GIT_SRC \
@@ -60,10 +62,10 @@ RUN set -ex \
60
62
61
63
# Install stunnel
62
64
RUN set -ex \
63
- && STUNNEL_VERSION=5.56 \
65
+ && STUNNEL_VERSION=5.68 \
64
66
&& STUNNEL_TAR=stunnel-$STUNNEL_VERSION.tar.gz \
65
- && STUNNEL_SHA256="7384bfb356b9a89ddfee70b5ca494d187605bb516b4fff597e167f97e2236b22 " \
66
- && curl -o $STUNNEL_TAR https://www.stunnel .org/archive/5.x/$STUNNEL_TAR \
67
+ && STUNNEL_SHA256="dcd895ab088b043d4e0bafa8b934e7ab3e697293828dbe9fce46cb7609a7dacf " \
68
+ && curl -o $STUNNEL_TAR https://www.usenix .org.uk/mirrors/stunnel /archive/5.x/$STUNNEL_TAR \
67
69
&& echo "$STUNNEL_SHA256 $STUNNEL_TAR" | sha256sum -c - \
68
70
&& tar xvfz $STUNNEL_TAR \
69
71
&& cd stunnel-$STUNNEL_VERSION \
@@ -135,14 +137,14 @@ ENV JAVA_11_HOME="/usr/lib/jvm/java-11-amazon-corretto.aarch64" \
135
137
JAVA_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64" \
136
138
JDK_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64" \
137
139
JRE_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64/jre" \
138
- ANT_VERSION=1.10.8 \
140
+ ANT_VERSION=1.10.13 \
139
141
MAVEN_HOME="/opt/maven" \
140
142
MAVEN_VERSION=3.6.3 \
141
143
INSTALLED_GRADLE_VERSIONS="5.6.4 6.5" \
142
144
GRADLE_VERSION=6.5 \
143
145
SBT_VERSION=1.3.13 \
144
146
GRADLE_PATH="$SRC_DIR/gradle" \
145
- ANT_DOWNLOAD_SHA512="4d80dc6ba23eeec7769085ddb00261b7480b596b56c6e69aa221391acbfb7338eb5855179c88222c8021095ef1f64f43caf2b4f90e8305d7c3128026d4258d06 " \
147
+ ANT_DOWNLOAD_SHA512="de4ac604629e39a86a306f0541adb3775596909ad92feb8b7de759b1b286417db24f557228737c8b902d6abf722d2ce5bb0c3baa3640cbeec3481e15ab1958c9 " \
146
148
MAVEN_DOWNLOAD_SHA512="c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0" \
147
149
GRADLE_DOWNLOADS_SHA256="c9910513d0eed63cd8f5c7fec4cb4a05731144770104a0871234a4edc3ba3cef 6.5\n abc10bcedb58806e8654210f96031db541bcd2d6fc3161e81cb0572d6a15e821 5.6.4" \
148
150
SBT_DOWNLOAD_SHA256="854154de27a7d8c13b5a0f9a297cd1f254cc13b44588dae507e5d4fb2741bd22"
@@ -213,16 +215,16 @@ ENV PATH "/usr/local/bin/sbt/bin:$PATH"
213
215
RUN sbt version
214
216
# Cleanup
215
217
RUN rm -fr /tmp/* /var/tmp/* \
216
- && yum clean all
218
+ && yum clean all
217
219
# **************** END JAVA ****************************************************
218
220
219
221
220
222
# **************** PowerShell *******************************************************
221
223
222
224
# Install Powershell Core
223
- ENV POWERSHELL_VERSION 7.0.2
225
+ ENV POWERSHELL_VERSION 7.0.13
224
226
ENV POWERSHELL_DOWNLOAD_URL https://github.com/PowerShell/PowerShell/releases/download/v$POWERSHELL_VERSION/powershell-$POWERSHELL_VERSION-linux-arm64.tar.gz
225
- ENV POWERSHELL_DOWNLOAD_SHA 8677301996b5335b872d267d41f588c145eeffa6b9736962530480b4d15cc295
227
+ ENV POWERSHELL_DOWNLOAD_SHA 033A7858954F9BD9A8E15116FC5AC5F2526FDCE7CEC5A5BC51D5751B87B249E7
226
228
227
229
RUN set -ex \
228
230
&& curl -SL $POWERSHELL_DOWNLOAD_URL --output powershell.tar.gz \
@@ -250,19 +252,19 @@ RUN n $NODE_10_VERSION && npm install --save-dev -g -f grunt && npm install --s
250
252
251
253
# **************** RUBY *********************************************************
252
254
253
- ENV RUBY_26_VERSION="2.6.6 "
255
+ ENV RUBY_26_VERSION="2.6.10 "
254
256
255
257
RUN rbenv install $RUBY_26_VERSION; rm -rf /tmp/*; rbenv global $RUBY_26_VERSION;ruby -v
256
258
257
259
# **************** END RUBY *****************************************************
258
260
259
261
# **************** PYTHON *****************************************************
260
- ENV PYTHON_37_VERSION="3.7.10 "
262
+ ENV PYTHON_37_VERSION="3.7.16 "
261
263
ENV PYTHON_PIP_VERSION=21.1.2
262
264
ENV PYYAML_VERSION=5.4.1
263
- ENV DOCKER_COMPOSE_VERSION="1.26.0 "
265
+ ENV DOCKER_COMPOSE_VERSION="1.26.2 "
264
266
265
- COPY tools/runtime_configs/python/$PYTHON_37_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
267
+ RUN cat tools/runtime_configs/python/$PYTHON_37_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_37_VERSION
266
268
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION; rm -rf /tmp/*
267
269
RUN pyenv global $PYTHON_37_VERSION
268
270
RUN set -ex \
@@ -275,9 +277,9 @@ RUN set -ex \
275
277
# **************** END PYTHON *****************************************************
276
278
277
279
# **************** PHP ****************************************************
278
- ENV PHP_73_VERSION="7.3.19 "
280
+ ENV PHP_73_VERSION="7.3.33 "
279
281
280
- COPY tools/runtime_configs/php/$PHP_73_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
282
+ RUN cat tools/runtime_configs/php/$PHP_73_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
281
283
RUN phpenv install $PHP_73_VERSION; rm -rf /tmp/*; phpenv global $PHP_73_VERSION
282
284
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_73_VERSION/etc/conf.d/memory.ini"
283
285
@@ -290,8 +292,8 @@ ENV GOPATH="/go" \
290
292
DEP_VERSION="0.5.4" \
291
293
DEP_BINARY="dep-linux-arm64"
292
294
293
- ENV GOLANG_14_VERSION="1.14.7 "
294
- ENV GOLANG_14_DOWNLOAD_SHA256="fe5b6f6e441f3cb7b53ebf1a010bbebcb720ac98124984cfe2e51d72b8a58c71 "
295
+ ENV GOLANG_14_VERSION="1.14.15 "
296
+ ENV GOLANG_14_DOWNLOAD_SHA256="4d964166a189c22032521c63935437c304bb7f01673b196898cff525897a1c27 "
295
297
296
298
RUN set -ex \
297
299
&& mkdir -p "$GOPATH/src" "$GOPATH/bin" \
@@ -342,8 +344,8 @@ ENV DOCKER_BUCKET="download.docker.com" \
342
344
DOCKER_CHANNEL="stable" \
343
345
DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034"
344
346
345
- ENV DOCKER_SHA256="0259f8b6572f02cf0dafd7388ca0e4adfdbbfaba81cfb1b7443e89fccbed22c7 "
346
- ENV DOCKER_VERSION="20.10.9 "
347
+ ENV DOCKER_SHA256="2C75CD6C3DC9B81CB5BDE664C882E4339A2054E09CF09606F9F7DD6970E7F078 "
348
+ ENV DOCKER_VERSION="20.10.22 "
347
349
348
350
VOLUME /var/lib/docker
349
351
@@ -367,9 +369,9 @@ RUN set -ex \
367
369
&& chmod +x /usr/local/bin/dind
368
370
369
371
# Python 3.8
370
- ENV PYTHON_38_VERSION="3.8.10 "
372
+ ENV PYTHON_38_VERSION="3.8.16 "
371
373
372
- COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
374
+ RUN cat tools/runtime_configs/python/$PYTHON_38_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
373
375
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION; rm -rf /tmp/*
374
376
RUN pyenv global $PYTHON_38_VERSION
375
377
RUN set -ex \
@@ -380,9 +382,11 @@ RUN set -ex \
380
382
&& docker-compose version
381
383
382
384
# Python 3.9
383
- ENV PYTHON_39_VERSION="3.9.5 "
385
+ ENV PYTHON_39_VERSION="3.9.16 "
384
386
385
- COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
387
+ RUN set -ex \
388
+ && ls -la
389
+ RUN cat tools/runtime_configs/python/$PYTHON_39_VERSION > /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
386
390
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION; rm -rf /tmp/*
387
391
RUN pyenv global $PYTHON_39_VERSION
388
392
RUN set -ex \
@@ -402,7 +406,7 @@ RUN n $NODE_12_VERSION && npm install --save-dev -g -f grunt && npm install --s
402
406
FROM runtimes_2 AS runtimes_3
403
407
404
408
# DotNet 3.1
405
- ENV DOTNET_31_SDK_VERSION="3.1.301 "
409
+ ENV DOTNET_31_SDK_VERSION="3.1.426 "
406
410
ENV DOTNET_ROOT="/root/.dotnet"
407
411
408
412
RUN /usr/local/bin/dotnet-install.sh -v $DOTNET_31_SDK_VERSION \
@@ -421,12 +425,12 @@ RUN set -ex \
421
425
&& rm -rf /tmp/NuGetScratch
422
426
423
427
# Ruby 2.7
424
- ENV RUBY_27_VERSION="2.7.1 "
428
+ ENV RUBY_27_VERSION="2.7.7 "
425
429
RUN rbenv install $RUBY_27_VERSION; rm -rf /tmp/*; rbenv global $RUBY_27_VERSION;ruby -v
426
430
427
431
# Php 7.4
428
- ENV PHP_74_VERSION="7.4.7 "
429
- COPY tools/runtime_configs/php/$PHP_74_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
432
+ ENV PHP_74_VERSION="7.4.33 "
433
+ RUN cat tools/runtime_configs/php/$PHP_74_VERSION > /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
430
434
RUN phpenv install $PHP_74_VERSION; rm -rf /tmp/*; phpenv global $PHP_74_VERSION
431
435
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_74_VERSION/etc/conf.d/memory.ini"
432
436
@@ -435,17 +439,18 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin -
435
439
# **************** END PHP ****************************************************
436
440
437
441
# ===================END of runtimes_3 ==============
442
+
438
443
FROM runtimes_3 AS aarch64_v2
439
444
440
445
# Configure SSH
441
- COPY ssh_config /root/.ssh/config
442
- COPY runtimes.yml /codebuild/image/config/runtimes.yml
443
- COPY dockerd-entrypoint.sh /usr/local/bin/
444
- COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc
445
- COPY legal/bill_of_material.txt /usr/share/doc
446
- COPY amazon-ssm-agent.json /etc/amazon/ssm/
447
-
448
- ENTRYPOINT ["dockerd-entrypoint.sh" ]
446
+ RUN cat ssh_config > /root/.ssh/config
447
+ RUN mkdir -p /codebuild/image/config && cat runtimes.yml > /codebuild/image/config/runtimes.yml
448
+ RUN cat dockerd-entrypoint.sh > /usr/local/bin/dockerd-entrypoint.sh
449
+ RUN chmod +x /usr/local/bin/dockerd-entrypoint.sh
450
+ RUN cat legal/THIRD_PARTY_LICENSES.txt > /usr/share/doc/THIRD_PARTY_LICENSES.txt
451
+ RUN cat legal/bill_of_material.txt > /usr/share/doc/bill_of_material.txt
452
+ RUN cat amazon-ssm-agent.json > /etc/amazon/ssm/amazon-ssm-agent.json
449
453
450
- # =======================End of layer: aarch64_v2 =================
454
+ ENTRYPOINT [ "/usr/local/bin/dockerd-entrypoint.sh" ]
451
455
456
+ # =======================End of layer: aarch64_v2 =================
0 commit comments