Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services: docker
env:
- VERSION=openjdk-9-jre
- VERSION=openjdk-9-jdk
- VERSION=openjdk-8-jre VARIANT=alpine
- VERSION=openjdk-8-jdk VARIANT=alpine
- VERSION=openjdk-8-jre
- VERSION=openjdk-8-jdk
- VERSION=openjdk-7-jre
Expand All @@ -16,8 +18,8 @@ install:

before_script:
- env | sort
- cd "$VERSION"
- image="java:$VERSION"
- cd "${VERSION}${VARIANT:+/$VARIANT}"
- image="java:${VERSION}${VARIANT:+-$VARIANT}"

script:
- docker build -t "$image" .
Expand Down
29 changes: 29 additions & 0 deletions openjdk-8-jdk/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM alpine:3.3

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
# 2. Compiling OpenJDK also requires the JDK to be installed, and it gets
# really hairy.

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

# add a simple script that can auto-detect the appropriate JAVA_HOME value
# based on whether the JDK or only the JRE is installed
RUN { \
echo '#!/bin/sh -e'; \
echo; \
echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \
} > /usr/local/bin/docker-java-home \
&& chmod +x /usr/local/bin/docker-java-home

ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk

ENV JAVA_VERSION 8u72
ENV PATH $PATH:/usr/lib/jvm/java-1.8-openjdk/bin

RUN set -x \
&& apk add --no-cache \
"openjdk8>=${JAVA_VERSION/u/.}" \
ca-certificates \
&& [ "$JAVA_HOME" = "$(docker-java-home)" ]
28 changes: 28 additions & 0 deletions openjdk-8-jre/alpine/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
FROM alpine:3.3

# A few problems with compiling Java from source:
# 1. Oracle. Licensing prevents us from redistributing the official JDK.
# 2. Compiling OpenJDK also requires the JDK to be installed, and it gets
# really hairy.

# Default to UTF-8 file.encoding
ENV LANG C.UTF-8

# add a simple script that can auto-detect the appropriate JAVA_HOME value
# based on whether the JDK or only the JRE is installed
RUN { \
echo '#!/bin/sh -e'; \
echo; \
echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \
} > /usr/local/bin/docker-java-home \
&& chmod +x /usr/local/bin/docker-java-home

ENV JAVA_VERSION 8u72
ENV JAVA_HOME /usr/lib/jvm/java-1.8-openjdk/jre

RUN set -x \
&& apk add --no-cache \
"openjdk8>=${JAVA_VERSION/u/.}" \
ca-certificates \
&& [ "$JAVA_HOME" = "$(docker-java-home)" ]