Skip to content

Commit ce54950

Browse files
committed
Add a basic Dockerfile for the latest 10 snap
See #88
1 parent a35def8 commit ce54950

File tree

5 files changed

+100
-0
lines changed

5 files changed

+100
-0
lines changed

Diff for: 10/VERSION

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
10.0.0.0-SNAPSHOT

Diff for: 10/jdk21/Dockerfile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM eclipse-temurin:21-jdk-jammy
2+
3+
RUN apt-get update && apt-get install -y libc6-dev make --no-install-recommends && rm -rf /var/lib/apt/lists/*
4+
5+
ENV JRUBY_VERSION 9.4.12.0
6+
ENV JRUBY_SHA256 e71398d3d404c3f2a3b831039a1bf860ec30108dfc22440b4dc1bfe519ac119b
7+
RUN mkdir /opt/jruby \
8+
# restore this line once 10 is released
9+
# && 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 \
10+
&& curl -fSL https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-dist/10.0.0.0-SNAPSHOT/jruby-dist-10.0.0.0-20250304.210303-3-bin.tar.gz -o /tmp/jruby.tar.gz \
11+
&& echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \
12+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
13+
&& rm /tmp/jruby.tar.gz \
14+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
15+
ENV PATH /opt/jruby/bin:$PATH
16+
17+
# skip installing gem documentation
18+
RUN mkdir -p /opt/jruby/etc \
19+
&& { \
20+
echo 'install: --no-document'; \
21+
echo 'update: --no-document'; \
22+
} >> /opt/jruby/etc/gemrc
23+
24+
RUN gem install bundler rake net-telnet xmlrpc
25+
26+
# don't create ".bundle" in all our apps
27+
ENV GEM_HOME /usr/local/bundle
28+
ENV BUNDLE_SILENCE_ROOT_WARNING=1 \
29+
BUNDLE_APP_CONFIG="$GEM_HOME"
30+
ENV PATH $GEM_HOME/bin:$PATH
31+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
32+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
33+
34+
CMD [ "irb" ]
35+

Diff for: 10/jre21/Dockerfile

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
FROM eclipse-temurin:21-jre-jammy
2+
3+
RUN apt-get update && apt-get install -y libc6-dev make --no-install-recommends && rm -rf /var/lib/apt/lists/*
4+
5+
ENV JRUBY_VERSION 10.0.0.0-SNAPSHOT
6+
ENV JRUBY_SHA256 e71398d3d404c3f2a3b831039a1bf860ec30108dfc22440b4dc1bfe519ac119b
7+
RUN mkdir /opt/jruby \
8+
# restore this line once 10 is released
9+
# && 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 \
10+
&& curl -fSL https://oss.sonatype.org/content/repositories/snapshots/org/jruby/jruby-dist/10.0.0.0-SNAPSHOT/jruby-dist-10.0.0.0-20250304.210303-3-bin.tar.gz -o /tmp/jruby.tar.gz \
11+
&& echo "$JRUBY_SHA256 /tmp/jruby.tar.gz" | sha256sum -c - \
12+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
13+
&& rm /tmp/jruby.tar.gz \
14+
&& update-alternatives --install /usr/local/bin/ruby ruby /opt/jruby/bin/jruby 1
15+
ENV PATH /opt/jruby/bin:$PATH
16+
17+
# skip installing gem documentation
18+
RUN mkdir -p /opt/jruby/etc \
19+
&& { \
20+
echo 'install: --no-document'; \
21+
echo 'update: --no-document'; \
22+
} >> /opt/jruby/etc/gemrc
23+
24+
RUN gem install bundler rake net-telnet xmlrpc
25+
26+
# don't create ".bundle" in all our apps
27+
ENV GEM_HOME /usr/local/bundle
28+
ENV BUNDLE_SILENCE_ROOT_WARNING=1 \
29+
BUNDLE_APP_CONFIG="$GEM_HOME"
30+
ENV PATH $GEM_HOME/bin:$PATH
31+
# adjust permissions of a few directories for running "gem install" as an arbitrary user
32+
RUN mkdir -p "$GEM_HOME" && chmod 777 "$GEM_HOME"
33+
34+
CMD [ "irb" ]
35+

Diff for: 10/onbuild-jdk8/Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM jruby:9.2-jdk
2+
3+
RUN mkdir -p /usr/src/app
4+
WORKDIR /usr/src/app
5+
6+
ONBUILD ADD Gemfile /usr/src/app/
7+
ONBUILD ADD Gemfile.lock /usr/src/app/
8+
ONBUILD RUN bundle install --system
9+
10+
ONBUILD ADD . /usr/src/app

Diff for: 10/update.sh

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/bin/bash
2+
3+
(
4+
set -e
5+
6+
JRUBY_VERSION=$(< VERSION)
7+
SHA="$(curl -SLfs https://repo1.maven.org/maven2/org/jruby/jruby-dist/${JRUBY_VERSION}/jruby-dist-${JRUBY_VERSION}-bin.tar.gz.sha256)"
8+
SHA=$(printf '%s' ${SHA})
9+
10+
for i in $(ls); do
11+
if [ -d "$i" ]; then
12+
echo setting version on "$i/Dockerfile"
13+
sed -i -- "s/ENV\ JRUBY_VERSION.*/ENV JRUBY_VERSION ${JRUBY_VERSION}/" "$i/Dockerfile"
14+
sed -i -- "s/ENV\ JRUBY_SHA256.*/ENV JRUBY_SHA256 ${SHA}/" "$i/Dockerfile"
15+
fi
16+
done
17+
18+
echo versions updated to $JRUBY_VERSION @ $SHA
19+
)

0 commit comments

Comments
 (0)