Skip to content

Commit

Permalink
Apply image updates
Browse files Browse the repository at this point in the history
  • Loading branch information
leoherran-aws committed Aug 23, 2024
1 parent 020c2a4 commit 1bd6ad2
Show file tree
Hide file tree
Showing 10 changed files with 401 additions and 164 deletions.
15 changes: 11 additions & 4 deletions al2/aarch64/standard/2.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@

FROM public.ecr.aws/amazonlinux/amazonlinux:2 AS core

ENV EPEL_REPO="https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm"

# Install git, SSH, and other utilities
RUN set -ex \
&& yum install -yq openssh-clients \
Expand All @@ -21,7 +19,7 @@ RUN set -ex \
&& ssh-keyscan -t rsa,dsa -H github.com >> ~/.ssh/known_hosts \
&& ssh-keyscan -t rsa,dsa -H bitbucket.org >> ~/.ssh/known_hosts \
&& chmod 600 ~/.ssh/known_hosts \
&& yum install -yq $EPEL_REPO \
&& amazon-linux-extras install epel -y \
&& rpm --import https://download.mono-project.com/repo/xamarin.gpg \
&& curl https://download.mono-project.com/repo/centos7-stable.repo | tee /etc/yum.repos.d/mono-centos7-stable.repo \
&& amazon-linux-extras enable corretto8 \
Expand All @@ -36,7 +34,7 @@ RUN set -ex \
libtidy-devel libunwind libwebp-devel libxml2-devel libxslt libxslt-devel \
libyaml-devel libzip-devel mariadb-devel mlocate \
ncurses-devel oniguruma-devel openssl openssl-devel perl-DBD-SQLite \
perl-DBI perl-HTTP-Date perl-IO-Pty-Easy perl-TimeDate perl-YAML-LibYAML \
perl-DBI perl-HTTP-Date perl-IO-Pty-Easy perl-TimeDate perl-YAML-LibYAML perl perl-FindBin \
postgresql-devel procps-ng python-configobj readline-devel rsync sgml-common \
subversion-perl tar tcl tk vim wget which xfsprogs xmlto xorg-x11-server-Xvfb xz-devel \
amazon-ecr-credential-helper runc
Expand Down Expand Up @@ -120,6 +118,12 @@ ENV PATH="/root/.pyenv/shims:/root/.pyenv/bin:$PATH"
RUN curl -L https://raw.githubusercontent.com/phpenv/phpenv-installer/master/bin/phpenv-installer | bash
ENV PATH="/root/.phpenv/shims:/root/.phpenv/bin:$PATH"

##go
RUN git clone https://github.com/syndbg/goenv.git $HOME/.goenv
ENV PATH="/root/.goenv/shims:/root/.goenv/bin:/go/bin:$PATH"
ENV GOENV_DISABLE_GOPATH=1
ENV GOPATH="/go"

#=======================End of layer: tools =================

FROM tools AS runtimes_1
Expand Down Expand Up @@ -149,6 +153,9 @@ ENV JAVA_HOME="$JAVA_11_HOME" \
JRE_HOME="$JRE_11_HOME"

RUN set -ex \
&& yum -y install sudo \
&& sudo rpm --import https://yum.corretto.aws/corretto.key \
&& sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \
# Install Amazon Corretto 8
&& yum install -yq java-1.8.0-amazon-corretto-devel \
# Ensure Java cacerts symlink points to valid location
Expand Down
48 changes: 47 additions & 1 deletion al2/aarch64/standard/2.0/runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,22 @@ runtimes:
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
fi;
done
default:
commands:
- echo "Installing custom Corretto(OpenJDK) version $VERSION ..."
- yum -y install java-$VERSION-amazon-corretto-devel
- export JAVA_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
- export JRE_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
- export JDK_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
- |-
for tool_path in "$JAVA_HOME"/bin/*;
do tool=`basename "$tool_path"`;
if [ $tool != 'java-rmi.cgi' ];
then
rm -f /usr/bin/$tool /var/lib/alternatives/$tool \
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
fi;
done
golang:
versions:
1.12:
Expand All @@ -56,6 +72,12 @@ runtimes:
1.14:
commands:
- echo "Installing Go version 1.14 ..."
default:
commands:
- echo "Installing custom Go version $VERSION ..."
- rm -rf /usr/local/go
- goenv install $VERSION && rm -rf /tmp/*
- goenv global $VERSION
python:
versions:
3.9:
Expand All @@ -70,6 +92,11 @@ runtimes:
commands:
- echo "Installing Python version 3.7 ..."
- pyenv global $PYTHON_37_VERSION
default:
commands:
- echo "Installing custom Python version $VERSION ..."
- pyenv install $VERSION && rm -rf /tmp/*
- pyenv global $VERSION
php:
versions:
7.4:
Expand All @@ -80,6 +107,11 @@ runtimes:
commands:
- echo "Installing PHP version 7.3 ..."
- phpenv global $PHP_73_VERSION
default:
commands:
- echo "Installing custom PHP version $VERSION ..."
- phpenv install $VERSION && rm -rf /tmp/*
- phpenv global $VERSION
ruby:
versions:
2.6:
Expand All @@ -90,6 +122,11 @@ runtimes:
commands:
- echo "Installing Ruby version 2.7 ..."
- rbenv global $RUBY_27_VERSION
default:
commands:
- echo "Installing custom Ruby version $VERSION ..."
- rbenv install $VERSION && rm -rf /tmp/*
- rbenv global $VERSION
nodejs:
versions:
10:
Expand All @@ -100,13 +137,22 @@ runtimes:
commands:
- echo "Installing Node.js version 12 ..."
- n $NODE_12_VERSION
default:
commands:
- echo "Installing custom Node.js version $VERSION ..."
- n $VERSION && rm -rf /tmp/*
docker:
versions:
19:
commands:
- echo "Using Docker 19"
- echo "Specifying docker version in buildspec is deprecated. Using docker $DOCKER_VERSION"
dotnet:
versions:
3.1:
commands:
- echo "Installing .NET version 3.1 ..."
default:
commands:
- echo "Installing custom .Net version $VERSION ..."
- /usr/local/bin/dotnet-install.sh -v $VERSION && rm -rf /tmp/*
- test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION
Loading

0 comments on commit 1bd6ad2

Please sign in to comment.