-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
42 lines (37 loc) · 2.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# AlpineLinux for the beaglebone black, with glibc-2.23 and Oracle Java 8
# Based on https://github.com/anapsix/docker-alpine-java, for x86_64
FROM resin/beaglebone-black-alpine:3.6
MAINTAINER Don Smyth <[email protected]>
# 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