-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# AlpineLinux for the raspberry pi 3, with glibc-2.23 and Oracle Java 8 | ||
# Based on https://github.com/anapsix/docker-alpine-java, for x86_64 | ||
|
||
FROM resin/raspberrypi3-alpine:3.6 | ||
|
||
MAINTAINER Don Smyth <dsmyth@signett.com> | ||
|
||
# Java Version and other ENV | ||
ENV JAVA_VERSION_MAJOR=8 \ | ||
JAVA_VERSION_MINOR=141 \ | ||
JAVA_VERSION_BUILD=15 \ | ||
JAVA_PACKAGE=server-jre \ | ||
JAVA_JCE=standard \ | ||
JAVA_HOME=/opt/jdk \ | ||
PATH=${PATH}:/opt/jdk/jre/bin \ | ||
GLIBC_VERSION_MAJOR=2.22 \ | ||
GLIBC_VERSION=2.22-r8 \ | ||
LANG=C.UTF-8 | ||
|
||
# do all in one step | ||
RUN set -ex && \ | ||
apk upgrade --update && \ | ||
apk add --update libstdc++ curl ca-certificates bash && \ | ||
for pkg in glibc-${GLIBC_VERSION} glibc-bin-${GLIBC_VERSION} glibc-i18n-${GLIBC_VERSION}; do curl -sSL https://github.com/armhf-docker-library/alpine-pkg-glibc/releases/download/${GLIBC_VERSION_MAJOR}/${pkg}.apk -o /tmp/${pkg}.apk; done && \ | ||
apk add --allow-untrusted /tmp/*.apk && \ | ||
rm -v /tmp/*.apk && \ | ||
( /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true ) && \ | ||
echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh && \ | ||
/usr/glibc-compat/sbin/ldconfig /lib /usr/glibc-compat/lib && \ | ||
mkdir -p /opt && \ | ||
curl -jksSLH "Cookie:oraclelicense=accept-securebackup-cookie" -o /tmp/java.tar.gz \ | ||
http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-b${JAVA_VERSION_BUILD}/336fa29ff2bb4ef291e347e091f7f4a7/jdk-${JAVA_VERSION_MAJOR}u${JAVA_VERSION_MINOR}-linux-arm32-vfp-hflt.tar.gz && \ | ||
tar -C /tmp -xvzf /tmp/java.tar.gz && \ | ||
mkdir -p /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} && \ | ||
mv /tmp/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR}/jre /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} && \ | ||
ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} /opt/jdk && \ | ||
apk del curl glibc-i18n && \ | ||
rm -rf \ | ||
/tmp/* /var/cache/apk/* && \ | ||
echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' >> /etc/nsswitch.conf | ||
|
||
# EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# docker-alpine-java-rpi | ||
Docker image using alpine linux supporting Oracle Java JRE 8 | ||
|
||
Built for use with resin.io -- I found that the OpenJDK versions were way too slow. | ||
|
||
This is jre only -- to get full jdk, edit the Dockerfile to extract the full tarball in /opt, rather than extracting in /tmp and moving the jre to /opt. | ||
|
||
You can find the Docker image at docker.io/dpsmyth/docker-alpine-java-raspberrypi3 |