Skip to content

Commit 1bd6ad2

Browse files
committed
Apply image updates
1 parent 020c2a4 commit 1bd6ad2

File tree

10 files changed

+401
-164
lines changed

10 files changed

+401
-164
lines changed

al2/aarch64/standard/2.0/Dockerfile

+11-4
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111

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

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

121+
##go
122+
RUN git clone https://github.com/syndbg/goenv.git $HOME/.goenv
123+
ENV PATH="/root/.goenv/shims:/root/.goenv/bin:/go/bin:$PATH"
124+
ENV GOENV_DISABLE_GOPATH=1
125+
ENV GOPATH="/go"
126+
123127
#=======================End of layer: tools =================
124128

125129
FROM tools AS runtimes_1
@@ -149,6 +153,9 @@ ENV JAVA_HOME="$JAVA_11_HOME" \
149153
JRE_HOME="$JRE_11_HOME"
150154

151155
RUN set -ex \
156+
&& yum -y install sudo \
157+
&& sudo rpm --import https://yum.corretto.aws/corretto.key \
158+
&& sudo curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo \
152159
# Install Amazon Corretto 8
153160
&& yum install -yq java-1.8.0-amazon-corretto-devel \
154161
# Ensure Java cacerts symlink points to valid location

al2/aarch64/standard/2.0/runtimes.yml

+47-1
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ runtimes:
4141
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
4242
fi;
4343
done
44+
default:
45+
commands:
46+
- echo "Installing custom Corretto(OpenJDK) version $VERSION ..."
47+
- yum -y install java-$VERSION-amazon-corretto-devel
48+
- export JAVA_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
49+
- export JRE_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
50+
- export JDK_HOME="/usr/lib/jvm/java-$VERSION-amazon-corretto"
51+
- |-
52+
for tool_path in "$JAVA_HOME"/bin/*;
53+
do tool=`basename "$tool_path"`;
54+
if [ $tool != 'java-rmi.cgi' ];
55+
then
56+
rm -f /usr/bin/$tool /var/lib/alternatives/$tool \
57+
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
58+
fi;
59+
done
4460
golang:
4561
versions:
4662
1.12:
@@ -56,6 +72,12 @@ runtimes:
5672
1.14:
5773
commands:
5874
- echo "Installing Go version 1.14 ..."
75+
default:
76+
commands:
77+
- echo "Installing custom Go version $VERSION ..."
78+
- rm -rf /usr/local/go
79+
- goenv install $VERSION && rm -rf /tmp/*
80+
- goenv global $VERSION
5981
python:
6082
versions:
6183
3.9:
@@ -70,6 +92,11 @@ runtimes:
7092
commands:
7193
- echo "Installing Python version 3.7 ..."
7294
- pyenv global $PYTHON_37_VERSION
95+
default:
96+
commands:
97+
- echo "Installing custom Python version $VERSION ..."
98+
- pyenv install $VERSION && rm -rf /tmp/*
99+
- pyenv global $VERSION
73100
php:
74101
versions:
75102
7.4:
@@ -80,6 +107,11 @@ runtimes:
80107
commands:
81108
- echo "Installing PHP version 7.3 ..."
82109
- phpenv global $PHP_73_VERSION
110+
default:
111+
commands:
112+
- echo "Installing custom PHP version $VERSION ..."
113+
- phpenv install $VERSION && rm -rf /tmp/*
114+
- phpenv global $VERSION
83115
ruby:
84116
versions:
85117
2.6:
@@ -90,6 +122,11 @@ runtimes:
90122
commands:
91123
- echo "Installing Ruby version 2.7 ..."
92124
- rbenv global $RUBY_27_VERSION
125+
default:
126+
commands:
127+
- echo "Installing custom Ruby version $VERSION ..."
128+
- rbenv install $VERSION && rm -rf /tmp/*
129+
- rbenv global $VERSION
93130
nodejs:
94131
versions:
95132
10:
@@ -100,13 +137,22 @@ runtimes:
100137
commands:
101138
- echo "Installing Node.js version 12 ..."
102139
- n $NODE_12_VERSION
140+
default:
141+
commands:
142+
- echo "Installing custom Node.js version $VERSION ..."
143+
- n $VERSION && rm -rf /tmp/*
103144
docker:
104145
versions:
105146
19:
106147
commands:
107-
- echo "Using Docker 19"
148+
- echo "Specifying docker version in buildspec is deprecated. Using docker $DOCKER_VERSION"
108149
dotnet:
109150
versions:
110151
3.1:
111152
commands:
112153
- echo "Installing .NET version 3.1 ..."
154+
default:
155+
commands:
156+
- echo "Installing custom .Net version $VERSION ..."
157+
- /usr/local/bin/dotnet-install.sh -v $VERSION && rm -rf /tmp/*
158+
- test -f "global.json" && echo "Using provided global.json" || dotnet new globaljson --sdk-version $VERSION

0 commit comments

Comments
 (0)