Skip to content

Commit

Permalink
Introduce JRE 17 images
Browse files Browse the repository at this point in the history
  • Loading branch information
nfrankel committed Aug 18, 2023
1 parent 686eba8 commit 85c44cd
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ jobs:
- 9.3/jdk17/Dockerfile
- 9.3/jre8/Dockerfile
- 9.3/jre11/Dockerfile
- 9.3/jre17/Dockerfile
- 9.4/jdk8/Dockerfile
- 9.4/jdk11/Dockerfile
- 9.4/jdk17/Dockerfile
- 9.4/jre8/Dockerfile
- 9.4/jre11/Dockerfile
- 9.4/jre17/Dockerfile
runs-on: ubuntu-latest

steps:
Expand Down
33 changes: 33 additions & 0 deletions 9.3/jre17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM eclipse-temurin:17-jre-focal

RUN apt-get update && apt-get install -y libc6-dev make --no-install-recommends && rm -rf /var/lib/apt/lists/*

ENV JRUBY_VERSION 9.3.10.0
ENV JRUBY_SHA256 c78c127e0aa166f257eeab03c4733ba3d96a445314eff7e5dc1f8154d2b5ae45
RUN mkdir /opt/jruby \
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
&& echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
&& rm /tmp/jruby.tar.gz \
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
ENV PATH /opt/jruby/bin:$PATH

# skip installing gem documentation
RUN mkdir -p /opt/jruby/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /opt/jruby/etc/gemrc

RUN gem install bundler rake net-telnet xmlrpc

# don't create ".bundle" in all our apps
ENV GEM_HOME /usr/local/bundle
ENV BUNDLE_SILENCE_ROOT_WARNING=1 \
BUNDLE_APP_CONFIG="$GEM_HOME"
ENV PATH $GEM_HOME/bin:$PATH
# adjust permissions of a few directories for running "gem install" as an arbitrary user
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"

CMD [ "irb" ]

33 changes: 33 additions & 0 deletions 9.4/jre17/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM eclipse-temurin:17-jre-focal

RUN apt-get update && apt-get install -y libc6-dev make --no-install-recommends && rm -rf /var/lib/apt/lists/*

ENV JRUBY_VERSION 9.4.3.0
ENV JRUBY_SHA256 b097e08c5669e8a188288e113911d12b4ad2bd67a2c209d6dfa8445d63a4d8c9
RUN mkdir /opt/jruby \
&& curl -fSL https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz -o /tmp/jruby.tar.gz \
&& echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
&& rm /tmp/jruby.tar.gz \
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
ENV PATH /opt/jruby/bin:$PATH

# skip installing gem documentation
RUN mkdir -p /opt/jruby/etc \
&& { \
echo 'install: --no-document'; \
echo 'update: --no-document'; \
} >> /opt/jruby/etc/gemrc

RUN gem install bundler rake net-telnet xmlrpc

# don't create ".bundle" in all our apps
ENV GEM_HOME /usr/local/bundle
ENV BUNDLE_SILENCE_ROOT_WARNING=1 \
BUNDLE_APP_CONFIG="$GEM_HOME"
ENV PATH $GEM_HOME/bin:$PATH
# adjust permissions of a few directories for running "gem install" as an arbitrary user
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"

CMD [ "irb" ]

0 comments on commit 85c44cd

Please sign in to comment.