Skip to content

Commit b9529b6

Browse files
committed
Add JRuby 1.7 JRE and JDK Alpine image
Add JRuby 1.7 JRE Alpine image
1 parent 46c09aa commit b9529b6

File tree

2 files changed

+90
-0
lines changed

2 files changed

+90
-0
lines changed

1.7/alpine-jdk/Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM java:8-jdk-alpine
2+
3+
RUN apk add --no-cache \
4+
bash \
5+
libc6-compat
6+
7+
ENV JRUBY_VERSION 1.7.25
8+
ENV JRUBY_SHA1 cd15aef419f97cff274491e53fcfb8b88ec36785
9+
10+
RUN apk add --no-cache --virtual .build-deps \
11+
curl \
12+
tar \
13+
&& mkdir -p /opt/jruby \
14+
&& curl -fSL https://s3.amazonaws.com/jruby.org/downloads/${JRUBY_VERSION}/jruby-bin-${JRUBY_VERSION}.tar.gz -o /tmp/jruby.tar.gz \
15+
&& echo "$JRUBY_SHA1 */tmp/jruby.tar.gz" | sha1sum -c - \
16+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
17+
&& rm /tmp/jruby.tar.gz \
18+
&& ln -s /opt/jruby/bin/jruby /usr/local/bin/ruby \
19+
&& apk del .build-deps
20+
21+
# set the jruby binaries in the path
22+
ENV PATH /opt/jruby/bin:$PATH
23+
24+
# skip installing gem documentation
25+
RUN mkdir -p /opt/jruby/etc \
26+
&& { \
27+
echo 'install: --no-document'; \
28+
echo 'update: --no-document'; \
29+
} >> /opt/jruby/etc/gemrc
30+
31+
# install bundler, gem requires bash to work
32+
RUN gem install bundler
33+
34+
# install things globally, for great justice
35+
# and don't create ".bundle" in all our apps
36+
ENV GEM_HOME /usr/local/bundle
37+
ENV BUNDLE_PATH="$GEM_HOME" \
38+
BUNDLE_BIN="$GEM_HOME/bin" \
39+
BUNDLE_SILENCE_ROOT_WARNING=1 \
40+
BUNDLE_APP_CONFIG="$GEM_HOME"
41+
ENV PATH $BUNDLE_BIN:$PATH
42+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
43+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
44+
45+
CMD [ "irb" ]

1.7/alpine-jre/Dockerfile

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
FROM java:8-jre-alpine
2+
3+
RUN apk add --no-cache \
4+
bash \
5+
libc6-compat
6+
7+
ENV JRUBY_VERSION 1.7.25
8+
ENV JRUBY_SHA1 cd15aef419f97cff274491e53fcfb8b88ec36785
9+
10+
RUN apk add --no-cache --virtual .build-deps \
11+
curl \
12+
tar \
13+
&& mkdir -p /opt/jruby \
14+
&& curl -fSL https://s3.amazonaws.com/jruby.org/downloads/${JRUBY_VERSION}/jruby-bin-${JRUBY_VERSION}.tar.gz -o /tmp/jruby.tar.gz \
15+
&& echo "$JRUBY_SHA1 */tmp/jruby.tar.gz" | sha1sum -c - \
16+
&& tar -zx --strip-components=1 -f /tmp/jruby.tar.gz -C /opt/jruby \
17+
&& rm /tmp/jruby.tar.gz \
18+
&& ln -s /opt/jruby/bin/jruby /usr/local/bin/ruby \
19+
&& apk del .build-deps
20+
21+
# set the jruby binaries in the path
22+
ENV PATH /opt/jruby/bin:$PATH
23+
24+
# skip installing gem documentation
25+
RUN mkdir -p /opt/jruby/etc \
26+
&& { \
27+
echo 'install: --no-document'; \
28+
echo 'update: --no-document'; \
29+
} >> /opt/jruby/etc/gemrc
30+
31+
# install bundler, gem requires bash to work
32+
RUN gem install bundler
33+
34+
# install things globally, for great justice
35+
# and don't create ".bundle" in all our apps
36+
ENV GEM_HOME /usr/local/bundle
37+
ENV BUNDLE_PATH="$GEM_HOME" \
38+
BUNDLE_BIN="$GEM_HOME/bin" \
39+
BUNDLE_SILENCE_ROOT_WARNING=1 \
40+
BUNDLE_APP_CONFIG="$GEM_HOME"
41+
ENV PATH $BUNDLE_BIN:$PATH
42+
RUN mkdir -p "$GEM_HOME" "$BUNDLE_BIN" \
43+
&& chmod 777 "$GEM_HOME" "$BUNDLE_BIN"
44+
45+
CMD [ "irb" ]

0 commit comments

Comments
 (0)