Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
laszlocsontos committed Oct 12, 2018
1 parent 58d5466 commit c464487
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 0 deletions.
8 changes: 8 additions & 0 deletions 11/jdk/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ RUN set -ex; \
# ... and verify that it actually worked for one of the alternatives we care about
update-alternatives --query java | grep -q 'Status: manual'

# see https://bugs.debian.org/910804
RUN apt-get install -y --no-install-recommends wget && \
mkdir $JAVA_HOME/lib/jfr && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/default.jfc \
-O $JAVA_HOME/lib/jfr/default.jfc && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/profile.jfc \
-O $JAVA_HOME/lib/jfr/profile.jfc

# https://docs.oracle.com/javase/10/tools/jshell.htm
# https://en.wikipedia.org/wiki/JShell
CMD ["jshell"]
Expand Down
8 changes: 8 additions & 0 deletions 11/jdk/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ RUN set -ex; \
# ... and verify that it actually worked for one of the alternatives we care about
update-alternatives --query java | grep -q 'Status: manual'

# see https://bugs.debian.org/910804
RUN apt-get install -y --no-install-recommends wget && \
mkdir $JAVA_HOME/lib/jfr && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/default.jfc \
-O $JAVA_HOME/lib/jfr/default.jfc && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/profile.jfc \
-O $JAVA_HOME/lib/jfr/profile.jfc

# https://docs.oracle.com/javase/10/tools/jshell.htm
# https://en.wikipedia.org/wiki/JShell
CMD ["jshell"]
Expand Down
8 changes: 8 additions & 0 deletions 11/jre/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ RUN set -ex; \
# ... and verify that it actually worked for one of the alternatives we care about
update-alternatives --query java | grep -q 'Status: manual'

# see https://bugs.debian.org/910804
RUN apt-get install -y --no-install-recommends wget && \
mkdir $JAVA_HOME/lib/jfr && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/default.jfc \
-O $JAVA_HOME/lib/jfr/default.jfc && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/profile.jfc \
-O $JAVA_HOME/lib/jfr/profile.jfc

# If you're reading this and have any feedback on how this image could be
# improved, please open an issue or a pull request so we can discuss it!
#
Expand Down
8 changes: 8 additions & 0 deletions 11/jre/slim/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,14 @@ RUN set -ex; \
# ... and verify that it actually worked for one of the alternatives we care about
update-alternatives --query java | grep -q 'Status: manual'

# see https://bugs.debian.org/910804
RUN apt-get install -y --no-install-recommends wget && \
mkdir $JAVA_HOME/lib/jfr && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/default.jfc \
-O $JAVA_HOME/lib/jfr/default.jfc && \
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/profile.jfc \
-O $JAVA_HOME/lib/jfr/profile.jfc

# If you're reading this and have any feedback on how this image could be
# improved, please open an issue or a pull request so we can discuss it!
#
Expand Down
20 changes: 20 additions & 0 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,13 @@ for javaVersion in "${versions[@]}"; do
needCaHack=1
fi

needJfrHack=
if [ "$javaVersion" -eq 11 -a "$suite" == 'sid' ]; then
# JFC files are missing from the OpenJDK installation
# see https://bugs.debian.org/910804
needJfrHack=1
fi

debianPackage="openjdk-$javaVersion-$javaType"
debSuite="${addSuite:-$suite}"
debian-latest-version "$debianPackage" "$debSuite" > /dev/null # prime the cache
Expand Down Expand Up @@ -314,6 +321,19 @@ EOD
update-alternatives --query java | grep -q 'Status: manual'
EOD

if [ "$needJfrHack" ]; then
cat >> "$dir/Dockerfile" <<EOD
# see https://bugs.debian.org/910804
RUN apt-get install -y --no-install-recommends wget && \\
mkdir \$JAVA_HOME/lib/jfr && \\
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/default.jfc \\
-O \$JAVA_HOME/lib/jfr/default.jfc && \\
wget https://hg.openjdk.java.net/jdk/jdk11/raw-file/76072a077ee1/src/jdk.jfr/share/conf/jfr/profile.jfc \\
-O \$JAVA_HOME/lib/jfr/profile.jfc
EOD
fi

if [ "$needCaHack" ]; then
cat >> "$dir/Dockerfile" <<-EOD
Expand Down

0 comments on commit c464487

Please sign in to comment.