Skip to content

Update linux dockerfiles for standard:5.0,standard:4.0,amazonlinux2:3.0 #535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 28 additions & 27 deletions al2/x86_64/standard/3.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ RUN set -ex \

# Install stunnel
RUN set -ex \
&& STUNNEL_VERSION=5.56 \
&& STUNNEL_VERSION=5.64 \
&& STUNNEL_TAR=stunnel-$STUNNEL_VERSION.tar.gz \
&& STUNNEL_SHA256="7384bfb356b9a89ddfee70b5ca494d187605bb516b4fff597e167f97e2236b22" \
&& STUNNEL_SHA256="eebe53ed116ba43b2e786762b0c2b91511e7b74857ad4765824e7199e6faf883" \
&& curl -o $STUNNEL_TAR https://www.usenix.org.uk/mirrors/stunnel/archive/5.x/$STUNNEL_TAR && echo "$STUNNEL_SHA256 $STUNNEL_TAR" | sha256sum --check && tar xfz $STUNNEL_TAR \
&& cd stunnel-$STUNNEL_VERSION \
&& ./configure \
Expand All @@ -111,15 +111,15 @@ RUN set -ex \

# AWS Tools
# https://docs.aws.amazon.com/eks/latest/userguide/install-aws-iam-authenticator.html https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ECS_CLI_installation.html
RUN curl -sS -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/amd64/aws-iam-authenticator \
&& curl -sS -o /usr/local/bin/kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.16.8/2020-04-16/bin/linux/amd64/kubectl \
RUN curl -sS -o /usr/local/bin/aws-iam-authenticator https://amazon-eks.s3.us-west-2.amazonaws.com/1.22.6/2022-03-09/bin/linux/amd64/aws-iam-authenticator \
&& curl -sS -o /usr/local/bin/kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.22.6/2022-03-09/bin/linux/amd64/kubectl \
&& curl -sS -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest \
&& curl -sS -L https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz | tar xz -C /usr/local/bin \
&& chmod +x /usr/local/bin/kubectl /usr/local/bin/aws-iam-authenticator /usr/local/bin/ecs-cli /usr/local/bin/eksctl

# Configure SSM
RUN set -ex \
&& yum install -y -q https://s3.amazonaws.com/amazon-ssm-us-east-1/3.0.1390.0/linux_amd64/amazon-ssm-agent.rpm
&& yum install -y -q https://s3.amazonaws.com/amazon-ssm-us-east-1/3.1.1374.0/linux_amd64/amazon-ssm-agent.rpm

# Install env tools for runtimes
## Dotnet
Expand Down Expand Up @@ -172,12 +172,12 @@ ENV JAVA_11_HOME="/usr/lib/jvm/java-11-amazon-corretto.x86_64" \
JAVA_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64" \
JDK_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64" \
JRE_8_HOME="/usr/lib/jvm/java-1.8.0-amazon-corretto.x86_64/jre" \
ANT_VERSION=1.10.8 \
ANT_VERSION=1.10.12 \
MAVEN_HOME="/opt/maven" \
MAVEN_VERSION=3.6.3 \
INSTALLED_GRADLE_VERSIONS="4.10.3 5.6.4" \
GRADLE_VERSION=5.6.4 \
SBT_VERSION=1.6.1 \
SBT_VERSION=1.6.2 \
ANDROID_HOME="/usr/local/android-sdk-linux" \
GRADLE_PATH="$SRC_DIR/gradle" \
ANDROID_SDK_MANAGER_VER="4333796" \
Expand All @@ -186,11 +186,11 @@ ENV JAVA_11_HOME="/usr/lib/jvm/java-11-amazon-corretto.x86_64" \
ANDROID_SDK_BUILD_TOOLS_28="build-tools;28.0.3" \
ANDROID_SDK_PLATFORM_TOOLS_28="platforms;android-28" \
ANDROID_SDK_EXTRAS="extras;android;m2repository extras;google;m2repository extras;google;google_play_services" \
ANT_DOWNLOAD_SHA512="4d80dc6ba23eeec7769085ddb00261b7480b596b56c6e69aa221391acbfb7338eb5855179c88222c8021095ef1f64f43caf2b4f90e8305d7c3128026d4258d06" \
ANT_DOWNLOAD_SHA512="2287dc5cfc21043c14e5413f9afb1c87c9f266ec2a9ba2d3bf2285446f6e4ccb59b558bf2e5c57911a05dfa293c7d5c7ad60ac9f744ba11406f4e6f9a27b2403" \
MAVEN_DOWNLOAD_SHA512="c35a1803a6e70a126e80b2b3ae33eed961f83ed74d18fcd16909b2d44d7dada3203f1ffe726c17ef8dcca2dcaa9fca676987befeadc9b9f759967a8cb77181c0" \
GRADLE_DOWNLOADS_SHA256="abc10bcedb58806e8654210f96031db541bcd2d6fc3161e81cb0572d6a15e821 5.6.4\n336b6898b491f6334502d8074a6b8c2d73ed83b92123106bd4bf837f04111043 4.10.3" \
ANDROID_SDK_MANAGER_SHA256="92ffee5a1d98d856634e8b71132e8a95d96c83a63fde1099be3d86df3106def9" \
SBT_DOWNLOAD_SHA256="60286bf1b875b31e2955f8a699888cd2612e9afd94d03cde0a2e71efd7492ffc" \
SBT_DOWNLOAD_SHA256="637637b6c4e6fa04ab62cd364061e32b12480b09001cd23303df62b36fadd440" \
LOG4J_UNSAFE_VERSIONS="2.11.1 1.2.8"

ARG MAVEN_CONFIG_HOME="/root/.m2"
Expand Down Expand Up @@ -231,7 +231,7 @@ RUN set -x \
update-alternatives --install /usr/bin/$tool $tool $tool_path 10000; \
update-alternatives --set $tool $tool_path; \
done \
&& rm $JAVA_HOME/lib/security/cacerts && ln -s /etc/pki/java/cacerts $JAVA_HOME/lib/security/cacerts \
&& rm $JAVA_HOME/lib/security/cacerts && ln -s /etc/pki/java/cacerts $JAVA_HOME/lib/security/cacerts \
# Install Ant
&& curl -LSso /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz https://archive.apache.org/dist/ant/binaries/apache-ant-$ANT_VERSION-bin.tar.gz \
&& echo "$ANT_DOWNLOAD_SHA512 /var/tmp/apache-ant-$ANT_VERSION-bin.tar.gz" | sha512sum -c - \
Expand Down Expand Up @@ -306,7 +306,7 @@ ENV NODE_10_VERSION="10.24.1"
RUN n $NODE_10_VERSION && npm install --save-dev -g -f grunt && npm install --save-dev -g -f grunt-cli && npm install --save-dev -g -f webpack \
&& curl -sSL https://dl.yarnpkg.com/rpm/yarn.repo | tee /etc/yum.repos.d/yarn.repo \
&& rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg \
&& yum install -y https://download-ib01.fedoraproject.org/pub/epel/8/Modular/x86_64/Packages/l/libuv-1.43.0-2.module_el8+13774+f8c1f5a5.x86_64.rpm \
&& yum install -y https://download-ib01.fedoraproject.org/pub/epel/8/Modular/x86_64/Packages/l/libuv-1.43.0-2.module_el8+13804+34326f90.x86_64.rpm \
&& yum install -y -q yarn \
&& yarn --version \
&& cd / && rm -rf $N_SRC_DIR && rm -rf /tmp/*
Expand All @@ -315,14 +315,14 @@ RUN n $NODE_10_VERSION && npm install --save-dev -g -f grunt && npm install --s

#**************** RUBY *********************************************************

ENV RUBY_26_VERSION="2.6.6"
ENV RUBY_26_VERSION="2.6.10"

RUN rbenv install $RUBY_26_VERSION && rm -rf /tmp/* && rbenv global $RUBY_26_VERSION && ruby -v

#**************** END RUBY *****************************************************

#**************** PYTHON *****************************************************
ENV PYTHON_37_VERSION="3.7.10"
ENV PYTHON_37_VERSION="3.7.13"
ENV PYTHON_PIP_VERSION=21.1.2
ENV PYYAML_VERSION=5.4.1

Expand All @@ -337,7 +337,7 @@ RUN set -ex \
#**************** END PYTHON *****************************************************

#**************** PHP ****************************************************
ENV PHP_73_VERSION="7.3.19"
ENV PHP_73_VERSION="7.3.33"

COPY tools/runtime_configs/php/$PHP_73_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_73_VERSION
RUN phpenv install $PHP_73_VERSION && rm -rf /tmp/* && phpenv global $PHP_73_VERSION
Expand Down Expand Up @@ -370,8 +370,8 @@ ENV DOCKER_BUCKET="download.docker.com" \
DIND_COMMIT="3b5fac462d21ca164b3778647420016315289034" \
DOCKER_COMPOSE_VERSION="1.26.0"

ENV DOCKER_SHA256="dd6ff72df1edfd61ae55feaa4aadb88634161f0aa06dbaaf291d1be594099ff3"
ENV DOCKER_VERSION="20.10.11"
ENV DOCKER_SHA256="9ccfc39305ae1d8882d18c9c431544fca82913d6df717409ac2244ac58c4f070"
ENV DOCKER_VERSION="20.10.15"

VOLUME /var/lib/docker

Expand All @@ -392,7 +392,7 @@ RUN set -ex \
&& docker-compose version

#Python 3.8
ENV PYTHON_38_VERSION="3.8.10"
ENV PYTHON_38_VERSION="3.8.13"

COPY tools/runtime_configs/python/$PYTHON_38_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_38_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_38_VERSION && rm -rf /tmp/*
Expand All @@ -403,7 +403,7 @@ RUN set -ex \
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv --use-feature=2020-resolver

#Python 3.9
ENV PYTHON_39_VERSION="3.9.5"
ENV PYTHON_39_VERSION="3.9.12"

COPY tools/runtime_configs/python/$PYTHON_39_VERSION /root/.pyenv/plugins/python-build/share/python-build/$PYTHON_39_VERSION
RUN env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $PYTHON_39_VERSION && rm -rf /tmp/*
Expand All @@ -414,7 +414,7 @@ RUN set -ex \
&& pip3 install --no-cache-dir --upgrade 'setuptools==57.4.0' wheel aws-sam-cli awscli boto3 pipenv virtualenv --use-feature=2020-resolver

# Node 12
ENV NODE_12_VERSION="12.22.2"
ENV NODE_12_VERSION="12.22.12"

RUN n $NODE_12_VERSION && npm install --save-dev -g -f grunt && npm install --save-dev -g -f grunt-cli && npm install --save-dev -g -f webpack \
&& rm -rf /tmp/*
Expand All @@ -423,9 +423,10 @@ RUN n $NODE_12_VERSION && npm install --save-dev -g -f grunt && npm install --s
FROM runtimes_2 AS runtimes_3

#DotNet 3.1
ENV DOTNET_31_SDK_VERSION="3.1.301"
ENV DOTNET_31_SDK_VERSION="3.1.419"
ENV DOTNET_ROOT="/root/.dotnet"

# Add .NET Core 3.1 Global Tools install folder to PATH
RUN /usr/local/bin/dotnet-install.sh -v $DOTNET_31_SDK_VERSION \
&& dotnet --list-sdks \
&& rm -rf /tmp/*
Expand All @@ -447,15 +448,15 @@ RUN set -ex \
&& ln -s ~/.dotnet/tools/dotnet-gitversion /usr/local/bin/gitversion

#Ruby 2.7
ENV RUBY_27_VERSION="2.7.2"
ENV RUBY_27_VERSION="2.7.6"
RUN rbenv install $RUBY_27_VERSION && rm -rf /tmp/* && rbenv global $RUBY_27_VERSION && ruby -v

#Golang 14
ENV GOLANG_14_VERSION="1.14.12"
ENV GOLANG_14_VERSION="1.14.15"
RUN goenv install $GOLANG_14_VERSION && rm -rf /tmp/* && goenv global $GOLANG_14_VERSION

#Php 7.4
ENV PHP_74_VERSION="7.4.7"
ENV PHP_74_VERSION="7.4.29"
COPY tools/runtime_configs/php/$PHP_74_VERSION /root/.phpenv/plugins/php-build/share/php-build/definitions/$PHP_74_VERSION
RUN phpenv install $PHP_74_VERSION && rm -rf /tmp/* && phpenv global $PHP_74_VERSION
RUN echo "memory_limit = 1G;" >> "/root/.phpenv/versions/$PHP_74_VERSION/etc/conf.d/memory.ini"
Expand All @@ -473,10 +474,10 @@ FROM runtimes_3 AS al2_v3
# Configure SSH
COPY ssh_config /root/.ssh/config
COPY runtimes.yml /codebuild/image/config/runtimes.yml
COPY dockerd-entrypoint.sh /usr/local/bin/
COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc
COPY legal/bill_of_material.txt /usr/share/doc
COPY amazon-ssm-agent.json /etc/amazon/ssm/
COPY dockerd-entrypoint.sh /usr/local/bin/dockerd-entrypoint.sh
COPY legal/THIRD_PARTY_LICENSES.txt /usr/share/doc/THIRD_PARTY_LICENSES.txt
COPY legal/bill_of_material.txt /usr/share/doc/bill_of_material.txt
COPY amazon-ssm-agent.json /etc/amazon/ssm/amazon-ssm-agent.json

ENTRYPOINT ["/usr/local/bin/dockerd-entrypoint.sh"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ configure_option "--with-pdo-pgsql"

PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4"

#https://github.com/php-build/php-build/blob/master/share/php-build/definitions/7.3.19
#https://github.com/php-build/php-build/blob/master/share/php-build/definitions/7.3.33
#Don't change beyond this line

configure_option "--without-pear"
Expand All @@ -14,7 +14,6 @@ configure_option "--with-png-dir" "/usr"
configure_option "--with-jpeg-dir" "/usr"
configure_option "--enable-zip"

install_package "https://secure.php.net/distributions/php-7.3.19.tar.bz2"
install_xdebug "2.9.6"
install_package "https://secure.php.net/distributions/php-7.3.33.tar.bz2"
install_xdebug "3.1.3"
enable_builtin_opcache

Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ configure_option "--with-libedit"

PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j4"

#https://github.com/php-build/php-build/blob/master/share/php-build/definitions/7.4.7
#https://github.com/php-build/php-build/blob/master/share/php-build/definitions/7.4.29
#Don't change beyond this line

configure_option "--enable-gd"
configure_option "--with-jpeg"
configure_option "--with-zip"

install_package "https://secure.php.net/distributions/php-7.4.7.tar.bz2"
install_xdebug "2.9.6"
install_package "https://secure.php.net/distributions/php-7.4.29.tar.bz2"
install_xdebug "3.1.3"
enable_builtin_opcache

19 changes: 0 additions & 19 deletions al2/x86_64/standard/3.0/tools/runtime_configs/python/3.7.10

This file was deleted.

17 changes: 17 additions & 0 deletions al2/x86_64/standard/3.0/tools/runtime_configs/python/3.7.13
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.7.13

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1n" "https://www.openssl.org/source/openssl-1.1.1n.tar.gz#40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.7.13" "https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tar.xz#99f106275df8899c3e8cb9d7c01ce686c202ef275953301427194693de5bef84" standard verify_py37 copy_python_gdb ensurepip
else
install_package "Python-3.7.13" "https://www.python.org/ftp/python/3.7.13/Python-3.7.13.tgz#e405417f50984bc5870c7e7a9f9aeb93e9d270f5ac67f667a0cd3a09439682b5" standard verify_py37 copy_python_gdb ensurepip
fi
17 changes: 0 additions & 17 deletions al2/x86_64/standard/3.0/tools/runtime_configs/python/3.8.10

This file was deleted.

17 changes: 17 additions & 0 deletions al2/x86_64/standard/3.0/tools/runtime_configs/python/3.8.13
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.8.13

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1n" "https://www.openssl.org/source/openssl-1.1.1n.tar.gz#40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.8.13" "https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tar.xz#6f309077012040aa39fe8f0c61db8c0fa1c45136763299d375c9e5756f09cf57" standard verify_py38 copy_python_gdb ensurepip
else
install_package "Python-3.8.13" "https://www.python.org/ftp/python/3.8.13/Python-3.8.13.tgz#903b92d76354366b1d9c4434d0c81643345cef87c1600adfa36095d7b00eede4" standard verify_py38 copy_python_gdb ensurepip
fi
17 changes: 17 additions & 0 deletions al2/x86_64/standard/3.0/tools/runtime_configs/python/3.9.12
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
export PYTHON_CONFIGURE_OPTS="\
--enable-shared
--enable-loadable-sqlite-extensions"

# Don't change below this line.
# https://github.com/pyenv/pyenv/blob/master/plugins/python-build/share/python-build/3.9.12

#require_gcc
prefer_openssl11
export PYTHON_BUILD_CONFIGURE_WITH_OPENSSL=1
install_package "openssl-1.1.1n" "https://www.openssl.org/source/openssl-1.1.1n.tar.gz#40dceb51a4f6a5275bde0e6bf20ef4b91bfc32ed57c0552e2e8e15463372b17a" mac_openssl --if has_broken_mac_openssl
install_package "readline-8.1" "https://ftpmirror.gnu.org/readline/readline-8.1.tar.gz#f8ceb4ee131e3232226a17f51b164afc46cd0b9e6cef344be87c65962cb82b02" mac_readline --if has_broken_mac_readline
if has_tar_xz_support; then
install_package "Python-3.9.12" "https://www.python.org/ftp/python/3.9.12/Python-3.9.12.tar.xz#2cd94b20670e4159c6d9ab57f91dbf255b97d8c1a1451d1c35f4ec1968adf971" standard verify_py39 copy_python_gdb ensurepip
else
install_package "Python-3.9.12" "https://www.python.org/ftp/python/3.9.12/Python-3.9.12.tgz#70e08462ebf265012bd2be88a63d2149d880c73e53f1712b7bbbe93750560ae8" standard verify_py39 copy_python_gdb ensurepip
fi
17 changes: 0 additions & 17 deletions al2/x86_64/standard/3.0/tools/runtime_configs/python/3.9.5

This file was deleted.

Loading