1010# See the License for the specific language governing permissions and limitations under the License.
1111
1212FROM public.ecr.aws/amazonlinux/amazonlinux:2 AS core
13+ {{{ imagebuilder:environments }}}
14+ {{{ imagebuilder:components }}}
1315
1416# Install git, SSH, and other utilities
1517RUN set -ex \
1618 && yum install -yq openssh-clients \
1719 && mkdir ~/.ssh \
1820 && 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 \
2123 && chmod 600 ~/.ssh/known_hosts \
2224 && amazon-linux-extras install epel -y \
2325 && rpm --import https://download.mono-project.com/repo/xamarin.gpg \
@@ -47,7 +49,7 @@ FROM core AS tools
4749
4850# Install Git
4951RUN set -ex \
50- && GIT_VERSION=2.27.0 \
52+ && GIT_VERSION=2.39.1 \
5153 && GIT_TAR_FILE=git-$GIT_VERSION.tar.gz \
5254 && GIT_SRC=https://github.com/git/git/archive/v${GIT_VERSION}.tar.gz \
5355 && curl -L -o $GIT_TAR_FILE $GIT_SRC \
@@ -60,10 +62,10 @@ RUN set -ex \
6062
6163# Install stunnel
6264RUN set -ex \
63- && STUNNEL_VERSION=5.56 \
65+ && STUNNEL_VERSION=5.68 \
6466 && 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 \
6769 && echo "$STUNNEL_SHA256 $STUNNEL_TAR" | sha256sum -c - \
6870 && tar xvfz $STUNNEL_TAR \
6971 && cd stunnel-$STUNNEL_VERSION \
@@ -135,14 +137,14 @@ ENV JAVA_11_HOME="/usr/lib/jvm/java-11-amazon-corretto.aarch64" \
135137 JAVA_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64" \
136138 JDK_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.aarch64" \
137139 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 \
139141 MAVEN_HOME="/opt/maven" \
140142 MAVEN_VERSION=3.6.3 \
141143 INSTALLED_GRADLE_VERSIONS="5.6.4 6.5" \
142144 GRADLE_VERSION=6.5 \
143145 SBT_VERSION=1.3.13 \
144146 GRADLE_PATH="$SRC_DIR/gradle" \
145- ANT_DOWNLOAD_SHA512="4d80dc6ba23eeec7769085ddb00261b7480b596b56c6e69aa221391acbfb7338eb5855179c88222c8021095ef1f64f43caf2b4f90e8305d7c3128026d4258d06 " \
147+ ANT_DOWNLOAD_SHA512="de4ac604629e39a86a306f0541adb3775596909ad92feb8b7de759b1b286417db24f557228737c8b902d6abf722d2ce5bb0c3baa3640cbeec3481e15ab1958c9 " \
146148 MAVEN_DOWNLOAD_SHA512="c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0" \
147149 GRADLE_DOWNLOADS_SHA256="c9910513d0eed63cd8f5c7fec4cb4a05731144770104a0871234a4edc3ba3cef 6.5\n abc10bcedb58806e8654210f96031db541bcd2d6fc3161e81cb0572d6a15e821 5.6.4" \
148150 SBT_DOWNLOAD_SHA256="854154de27a7d8c13b5a0f9a297cd1f254cc13b44588dae507e5d4fb2741bd22"
@@ -213,16 +215,16 @@ ENV PATH "/usr/local/bin/sbt/bin:$PATH"
213215RUN sbt version
214216# Cleanup
215217RUN rm -fr /tmp/* /var/tmp/* \
216- && yum clean all
218+ && yum clean all
217219# **************** END JAVA ****************************************************
218220
219221
220222# **************** PowerShell *******************************************************
221223
222224# Install Powershell Core
223- ENV POWERSHELL_VERSION 7.0.2
225+ ENV POWERSHELL_VERSION 7.0.13
224226ENV 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
226228
227229RUN set -ex \
228230 && 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
250252
251253# **************** RUBY *********************************************************
252254
253- ENV RUBY_26_VERSION="2.6.6 "
255+ ENV RUBY_26_VERSION="2.6.10 "
254256
255257RUN rbenv install $RUBY_26_VERSION; rm -rf /tmp/*; rbenv global $RUBY_26_VERSION;ruby -v
256258
257259# **************** END RUBY *****************************************************
258260
259261# **************** PYTHON *****************************************************
260- ENV PYTHON_37_VERSION="3.7.10 "
262+ ENV PYTHON_37_VERSION="3.7.16 "
261263ENV PYTHON_PIP_VERSION=21.1.2
262264ENV PYYAML_VERSION=5.4.1
263- ENV DOCKER_COMPOSE_VERSION="1.26.0 "
265+ ENV DOCKER_COMPOSE_VERSION="1.26.2 "
264266
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
266268RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_37_VERSION; rm -rf /tmp/*
267269RUN pyenv global $PYTHON_37_VERSION
268270RUN set -ex \
@@ -275,9 +277,9 @@ RUN set -ex \
275277# **************** END PYTHON *****************************************************
276278
277279# **************** PHP ****************************************************
278- ENV PHP_73_VERSION="7.3.19 "
280+ ENV PHP_73_VERSION="7.3.33 "
279281
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
281283RUN phpenv install $PHP_73_VERSION; rm -rf /tmp/*; phpenv global $PHP_73_VERSION
282284RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_73_VERSION/etc/conf.d/memory.ini"
283285
@@ -290,8 +292,8 @@ ENV GOPATH="/go" \
290292 DEP_VERSION="0.5.4" \
291293 DEP_BINARY="dep-linux-arm64"
292294
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 "
295297
296298RUN set -ex \
297299 && mkdir -p "$GOPATH/src" "$GOPATH/bin" \
@@ -342,8 +344,8 @@ ENV DOCKER_BUCKET="download.docker.com" \
342344 DOCKER_CHANNEL="stable" \
343345 DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034"
344346
345- ENV DOCKER_SHA256="0259f8b6572f02cf0dafd7388ca0e4adfdbbfaba81cfb1b7443e89fccbed22c7 "
346- ENV DOCKER_VERSION="20.10.9 "
347+ ENV DOCKER_SHA256="2C75CD6C3DC9B81CB5BDE664C882E4339A2054E09CF09606F9F7DD6970E7F078 "
348+ ENV DOCKER_VERSION="20.10.22 "
347349
348350VOLUME /var/lib/docker
349351
@@ -367,9 +369,9 @@ RUN set -ex \
367369 && chmod +x /usr/local/bin/dind
368370
369371# Python 3.8
370- ENV PYTHON_38_VERSION="3.8.10 "
372+ ENV PYTHON_38_VERSION="3.8.16 "
371373
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
373375RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION; rm -rf /tmp/*
374376RUN pyenv global $PYTHON_38_VERSION
375377RUN set -ex \
@@ -380,9 +382,11 @@ RUN set -ex \
380382 && docker-compose version
381383
382384# Python 3.9
383- ENV PYTHON_39_VERSION="3.9.5 "
385+ ENV PYTHON_39_VERSION="3.9.16 "
384386
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
386390RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION; rm -rf /tmp/*
387391RUN pyenv global $PYTHON_39_VERSION
388392RUN set -ex \
@@ -402,7 +406,7 @@ RUN n $NODE_12_VERSION && npm install --save-dev -g -f grunt && npm install --s
402406FROM runtimes_2 AS runtimes_3
403407
404408# DotNet 3.1
405- ENV DOTNET_31_SDK_VERSION="3.1.301 "
409+ ENV DOTNET_31_SDK_VERSION="3.1.426 "
406410ENV DOTNET_ROOT="/root/.dotnet"
407411
408412RUN /usr/local/bin/dotnet-install.sh -v $DOTNET_31_SDK_VERSION \
@@ -421,12 +425,12 @@ RUN set -ex \
421425 && rm -rf /tmp/NuGetScratch
422426
423427# Ruby 2.7
424- ENV RUBY_27_VERSION="2.7.1 "
428+ ENV RUBY_27_VERSION="2.7.7 "
425429RUN rbenv install $RUBY_27_VERSION; rm -rf /tmp/*; rbenv global $RUBY_27_VERSION;ruby -v
426430
427431# 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
430434RUN phpenv install $PHP_74_VERSION; rm -rf /tmp/*; phpenv global $PHP_74_VERSION
431435RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_74_VERSION/etc/conf.d/memory.ini"
432436
@@ -435,17 +439,18 @@ RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin -
435439# **************** END PHP ****************************************************
436440
437441# ===================END of runtimes_3 ==============
442+
438443FROM runtimes_3 AS aarch64_v2
439444
440445# 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
449453
450- # =======================End of layer: aarch64_v2 =================
454+ ENTRYPOINT [ "/usr/local/bin/dockerd-entrypoint.sh" ]
451455
456+ # =======================End of layer: aarch64_v2 =================
0 commit comments