Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Now builds on both Open JDK and Oracle JDK. (#3)
Browse files Browse the repository at this point in the history
* Now builds on both Open JDK and Oracle JDK.

* Updated README to reflect that Oracle JDK is now supported.
  • Loading branch information
nigelgbanks authored and ruebot committed May 26, 2016
1 parent 7f66784 commit 6e25d8c
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 4 deletions.
24 changes: 24 additions & 0 deletions Dockerfile.open-jdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM islandora/claw-maven:open-jdk
MAINTAINER Nigel Banks <nigel.g.banks@gmail.com>

LABEL "License"="MIT" \
"Version"="0.0.1"

EXPOSE 8181

ARG KARAF_VERSION="4.0.5"

ENV KARAF_HOME="/opt/karaf" \
KARAF_OPTS="-Xms128M -Xmx512M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass" \
PATH=${PATH}:/opt/karaf/bin

RUN addgroup -g 1000 karaf && \
adduser -u 100 -s /sbin/nologin -G karaf -DH -h ${KARAF_HOME} karaf

RUN apk-install openssh bash && \
curl -L http://archive.apache.org/dist/karaf/${KARAF_VERSION}/apache-karaf-${KARAF_VERSION}.tar.gz | \
tar -xzf - -C /tmp && \
mv /tmp/apache-karaf-${KARAF_VERSION} /opt/karaf && \
cleanup

COPY rootfs /
24 changes: 24 additions & 0 deletions Dockerfile.oracle-jdk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM islandora/claw-maven:oracle-jdk
MAINTAINER Nigel Banks <nigel.g.banks@gmail.com>

LABEL "License"="MIT" \
"Version"="0.0.1"

EXPOSE 8181

ARG KARAF_VERSION="4.0.5"

ENV KARAF_HOME="/opt/karaf" \
KARAF_OPTS="-Xms128M -Xmx512M -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass" \
PATH=${PATH}:/opt/karaf/bin

RUN addgroup -g 1000 karaf && \
adduser -u 100 -s /sbin/nologin -G karaf -DH -h ${KARAF_HOME} karaf

RUN apk-install openssh bash && \
curl -L http://archive.apache.org/dist/karaf/${KARAF_VERSION}/apache-karaf-${KARAF_VERSION}.tar.gz | \
tar -xzf - -C /tmp && \
mv /tmp/apache-karaf-${KARAF_VERSION} /opt/karaf && \
cleanup

COPY rootfs /
2 changes: 0 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ For convenience a number of commands are provided in the [commands](/commands) f

## Notes

Eventually we will support running on either OpenJDK or Oracle JDK, but for the moment it only supports Open JDK.

If you experience issues with zombie Java processes not getting reaped, likely this is the result of a Kernel bug:

* https://github.com/docker/docker/issues/18180
Expand Down
7 changes: 5 additions & 2 deletions commands/build
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#!/bin/bash
readonly DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
docker build -t islandora/claw-karaf $DIR/..
readonly ROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/.." && pwd )"
docker build -f $ROOT/Dockerfile.oracle-jdk -t islandora/claw-karaf:oracle-jdk $ROOT
docker build -f $ROOT/Dockerfile.open-jdk -t islandora/claw-karaf:open-jdk $ROOT
# Open JDK is the default implementation.
docker tag islandora/claw-karaf:open-jdk islandora/claw-karaf:latest

0 comments on commit 6e25d8c

Please sign in to comment.