Skip to content

Commit

Permalink
Merge pull request #716 from LZY7977/master
Browse files Browse the repository at this point in the history
upgrade existing package versions; add new runtime versions; support …
  • Loading branch information
LZY7977 authored Apr 10, 2024
2 parents 769227e + 621cd87 commit 2f7c470
Show file tree
Hide file tree
Showing 10 changed files with 803 additions and 391 deletions.
2 changes: 1 addition & 1 deletion al2/x86_64/standard/4.0/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ RUN set -ex \
libicu-devel libjpeg-devel libpng-devel libserf libsqlite3x-devel \
libtidy-devel libunwind libwebp-devel libxml2-devel libxslt libxslt-devel \
libyaml-devel libzip-devel mariadb-devel mercurial mlocate mono-devel \
ncurses-devel oniguruma-devel openssl openssl-devel perl-DBD-SQLite \
ncurses-devel oniguruma-devel openssl openssl-devel perl perl-FindBin perl-DBD-SQLite \
perl-DBI perl-HTTP-Date perl-IO-Pty-Easy perl-TimeDate perl-YAML-LibYAML \
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 \
Expand Down
57 changes: 53 additions & 4 deletions al2/x86_64/standard/4.0/runtimes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,9 @@ runtimes:
corretto17:
commands:
- echo "Installing corretto(OpenJDK) version 17 ..."

- export JAVA_HOME="$JAVA_17_HOME"

- export JRE_HOME="$JRE_17_HOME"

- export JDK_HOME="$JDK_17_HOME"

- |-
for tool_path in "$JAVA_HOME"/bin/*;
do tool=`basename "$tool_path"`;
Expand All @@ -22,36 +18,84 @@ runtimes:
&& update-alternatives --install /usr/bin/$tool $tool $tool_path 20000;
fi;
done
default:
commands:
- echo "Installing custom Corretto(OpenJDK) version $VERSION ..."
- JAVA_VERSION="$VERSION"
- |
if [ "$VERSION" = "8" ]; then
JAVA_VERSION="1.8.0"
JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-amazon-corretto.x86_64"
else
JAVA_HOME="/usr/lib/jvm/java-$JAVA_VERSION-amazon-corretto"
fi
- export JAVA_HOME
- export JRE_HOME=$JAVA_HOME
- export JDK_HOME=$JAVA_HOME
- yum -y install java-$JAVA_VERSION-amazon-corretto-devel
- |
for tool_path in "$JAVA_HOME"/bin/*; do
tool=`basename "$tool_path"`
if [ "$tool" != "java-rmi.cgi" ]; then
echo "Updating alternatives for $tool"
rm -f /usr/bin/$tool /var/lib/alternatives/$tool
update-alternatives --install /usr/bin/$tool $tool $tool_path 20000
fi
done
golang:
versions:
1.18:
commands:
- echo "Installing Go version 1.18 ..."
- goenv global $GOLANG_18_VERSION
default:
commands:
- echo "Installing custom Go version $VERSION ..."
- goenv install $VERSION && rm -rf /tmp/*
- goenv global $VERSION
python:
versions:
3.9:
commands:
- echo "Installing Python version 3.9 ..."
- pyenv global $PYTHON_39_VERSION
default:
commands:
- echo "Installing custom Python version $VERSION ..."
- pyenv install $VERSION && rm -rf /tmp/*
- pyenv global $VERSION
php:
versions:
8.1:
commands:
- echo "Installing PHP version 8.1 ..."
- phpenv global $PHP_81_VERSION
default:
commands:
- echo "Installing custom PHP version $VERSION ..."
- phpenv install $VERSION && rm -rf /tmp/*
- phpenv global $VERSION
ruby:
versions:
3.1:
commands:
- echo "Installing Ruby version 3.1 ..."
- rbenv global $RUBY_31_VERSION
default:
commands:
- echo "Installing custom Ruby version $VERSION ..."
- rbenv install $VERSION && rm -rf /tmp/*
- rbenv global $VERSION
nodejs:
versions:
16:
commands:
- echo "Installing Node.js version 16 ..."
- n $NODE_16_VERSION
default:
commands:
- echo "Installing custom Node.js version $VERSION ..."
- n $VERSION && rm -rf /tmp/*
docker:
versions:
20:
Expand All @@ -62,3 +106,8 @@ runtimes:
6.0:
commands:
- echo "Installing .NET version 6.0 ..."
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 --roll-forward feature
Loading

0 comments on commit 2f7c470

Please sign in to comment.