Comments (13)
We have Alpine builds for x86-64
and aarch64but not other Alpine architectures, so we would have to build for that platform before we could consider producing docker files for it. I'm not personally sure there's so much demand for it on this architecture though, and to my knowledge this is the first time I've seen a request for it.
I see. Well then maybe you can start collecting requests here and once there's sufficient demand, it might become a thing? :)
from containers.
I need it, that's for sure. I have tons of arm32 machines, and they do need this arm32 version.
from containers.
@sxa did you by chance mean amd64
instead of aarch64
? I'm currently trying to build an image based on eclipse-temurin:17-jre-alpine
on an Apple silicon (M1) Mac and having trouble because I'm hitting an "Unsupported arch: aarch64" error
from containers.
No problem! Created #158 to track aarch64 support
from containers.
Those options are different between 8 and 11+ IIRC. My suspicion would be that our conditionals are set wrongly for JDK9 and pick up the 11 way instead of 8 or vice-versa (Not a surprise since we haven't built it for years). If you wanted to build it you could probably just strip those options out of the build process (or find the conditional that's wrong and PR it - I wouldn't have a problem with putting something that like in personally but I can't speak for other committers!
)
from containers.
@gounthar Any progress and maybe success on this topic?
I'm also interested on (any) java 11+ for use with Alpine (musl) on armv7.
from containers.
The armv7 (and v8) are used widely in new routers.
Here is for example list of routers based Marvell Armada that are supported by OpenWrt https://openwrt.org/docs/techref/targets/mvebu
Alpine has OpenJDK 8 compiled with the musl for the amrv7 and I was able to use it my router. There is even a repo that just repackaged the OpenJDK from the Alpine https://github.com/josedelinux/openwrt-jdk
The repo has 23 stars which is not so many but given how many of new devices appears on a market this may become more popular.
I also was able to use the Eclipse Temurin openjdk17 with glibc in Docker but that's cost me almost all of disk.
It would be really nice if users can download just the jdk directly from Temurin.
from containers.
We have Alpine builds for x86-64 and aarch64 but not other Alpine architectures, so we would have to build for that platform before we could consider producing docker files for it. I'm not personally sure there's so much demand for it on this architecture though, and to my knowledge this is the first time I've seen a request for it.
from containers.
@sxa we have same situation with temurin:11-jre-alpine
as describes above with using of Apple silicon (M1) Mac, do you plan to build image for arm64
soon?
from containers.
@mrdziuban Yep sorry for the confusion - have done a strikethrough on aarch64 in my earlier comment.
We don't currently have the testing infrasdtructure set up to do Alpine on aarch64 but given that this particular issue was a request for arm32v7 rather than aarch64 could you raise a separate issue to cover aarch64 please?
from containers.
I built an Alpine Docker image to build openJDK, but I'm kind of stuck.
My build fails with a strange (to me at least) error
#7 1285.3 Running ./configure with arguments 'bash ./configure --verbose --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205171934 --with-version-pre=beta --with-version-build=12 --with-debug-level=release --with-native-debug-symbols=none --with-jvm-variants=server,client --with-cacerts-file=/temurin-build/sbin/../security/cacerts --with-jobs=2 '''
#7 1285.3 Should have the source, I'm at /temurin-build/workspace/build/src
#7 1285.3 Currently at '/temurin-build/workspace/build/src'
#7 1288.8 Running generated-configure.sh
#7 1290.6 configure: WARNING: you should use --build, --host, --target
#7 1290.6 configure: error: unrecognized options: --with-vendor-name, --with-vendor-url, --with-vendor-bug-url, --with-vendor-vm-bug-url
#7 1290.7 configure exiting with result code 1
#7 1290.7 Note: Command line contains non-control variables:
#7 1290.7 * DEBUG_BINARIES=true
#7 1290.7 Make sure it is not mistyped, and that you intend to override this variable.
#7 1290.7 'make help' will list known control variables.
#7 1290.7
#7 1290.7 Error: No configurations found for /temurin-build/workspace/build/src.
This does not happen with the same image for aarch64 for example.
Of course, I'm not trying to build openjdk9 on aarch64, only openjdk11; for Alpine armhf, I can only find openjdk8 as a bootstrap, so I'm trying to build openjdk9.
Could it be linked to a too recent gcc
?
Thanks.
from containers.
I tried to build with docker
on an armv7
machine (so using Ubuntu
) and I have the same kind of error, so this may not be linked to Alpine
.
Certificate was added to keystore
real 4m42.839s
user 4m2.770s
sys 0m37.815s
build.sh : 13:00:31 : Initiating build ...
Pulling latest tags and getting the latest update version using git fetch -q --tags --depth=1
NOTE: This can take quite some time! Please be patient
From /openjdk//./build//src
* branch HEAD -> FETCH_HEAD
OpenJDK repo tag is jdk-9.0.4+12
Version: jdk
Should have the source, I'm at /openjdk/build/src
From /openjdk//./build//src
* branch HEAD -> FETCH_HEAD
OpenJDK repo tag is jdk-9.0.4+12
Completed configuring the version string parameter, config args are now: --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205181300 --with-version-pre=beta --with-version-build=12
Building up the configure command...
Configuring jvm variants if provided
Configure custom cacerts file security/cacerts
setting freetype dir to /openjdk//./build//installedfreetype
Completed configuring the version string parameter, config args are now: --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205181300 --with-version-pre=beta --with-version-build=12 --with-boot-jdk=/usr/lib/jvm/jdk8 --with-debug-level=release --with-native-debug-symbols=none --enable-ccache --with-jvm-variants=server,client --with-cacerts-file=/openjdk/sbin/../security/cacerts --with-jobs=1 '' --with-freetype=/openjdk//./build//installedfreetype
Configuring command and using the pre-built config params...
Should have the source, I'm at /openjdk/build/src
Currently at '/openjdk/build/src'
Running ./configure with arguments 'bash ./configure --verbose --with-vendor-name="Undefined Vendor" --with-vendor-url= --with-vendor-bug-url=file:///dev/null --with-vendor-vm-bug-url=file:///dev/null --with-version-opt=202205181300 --with-version-pre=beta --with-version-build=12 --with-boot-jdk=/usr/lib/jvm/jdk8 --with-debug-level=release --with-native-debug-symbols=none --enable-ccache --with-jvm-variants=server,client --with-cacerts-file=/openjdk/sbin/../security/cacerts --with-jobs=1 '' --with-freetype=/openjdk//./build//installedfreetype'
Should have the source, I'm at /openjdk/build/src
Currently at '/openjdk/build/src'
Running generated-configure.sh
configure: WARNING: you should use --build, --host, --target
configure: error: unrecognized options: --with-vendor-name, --with-vendor-url, --with-vendor-bug-url, --with-vendor-vm-bug-url
configure exiting with result code 1
Note: Command line contains non-control variables:
* DEBUG_BINARIES=true
Make sure it is not mistyped, and that you intend to override this variable.
'make help' will list known control variables.
Error: No configurations found for /openjdk/build/src.
Please run 'bash configure' to create a configuration.
/openjdk/build/src/make/Init.gmk:124: *** Cannot continue. Stop.
OpenJDK make failed, archiving make failed logs
/openjdk/sbin/build.sh: line 601: cd: build/*: No such file or directory
Copying hotspot/src/share/tools/IdealGraphVisualizer/branding/core/core.jar to TemurinLogsArchive/hotspot/src/share/tools/IdealGraphVisualizer/branding/core
cp: -r not specified; omitting directory 'hotspot/src/share/tools/IdealGraphVisualizer/branding/core/core.jar'
Archiving and compressing with gzip
real 0m0.030s
user 0m0.010s
sys 0m0.019s
Your final archive was created at /openjdk/build/src/OpenJDK.tar.gz
Moving the artifact to /openjdk//target/
archive done.
Failed to make the JDK, exiting
from containers.
Unfortunately, no.
I have retried building the armv7
jdk17
alpine
image, but there is no Temurin release for armv7
with musl
.
Before remembering that, I modified the Dockerfile so it looks like this:
FROM alpine:3.17
ENV JAVA_HOME /opt/java/openjdk
ENV PATH $JAVA_HOME/bin:$PATH
# Default to UTF-8 file.encoding
ENV LANG='en_US.UTF-8' LANGUAGE='en_US:en' LC_ALL='en_US.UTF-8'
# fontconfig and ttf-dejavu added to support serverside image generation by Java programs
RUN apk add --no-cache fontconfig libretls musl-locales musl-locales-lang ttf-dejavu tzdata zlib \
&& rm -rf /var/cache/apk/*
ENV JAVA_VERSION jdk-17.0.7+7
RUN set -eux; \
ARCH="$(apk --print-arch)"; \
case "${ARCH}" in \
amd64|x86_64) \
ESUM='b6edac2fa669876ef16b4895b36b61d01066626e7a69feba2acc19760c8d18cb'; \
BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_x64_alpine-linux_hotspot_17.0.7_7.tar.gz'; \
;; \
armv7) \
ESUM='e7a84c3e59704588510d7e6cce1f732f397b54a3b558c521912a18a1b4d0abdc'; \
BINARY_URL='https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.7%2B7/OpenJDK17U-jdk_arm_linux_hotspot_17.0.7_7.tar.gz'; \
;; \
*) \
echo "Unsupported arch: ${ARCH}"; \
exit 1; \
;; \
esac; \
wget -O /tmp/openjdk.tar.gz ${BINARY_URL}; \
echo "${ESUM} */tmp/openjdk.tar.gz" | sha256sum -c -; \
mkdir -p "$JAVA_HOME"; \
tar --extract \
--file /tmp/openjdk.tar.gz \
--directory "$JAVA_HOME" \
--strip-components 1 \
--no-same-owner \
; \
rm -f /tmp/openjdk.tar.gz ${JAVA_HOME}/src.zip;
RUN echo Verifying install ... \
&& fileEncoding="$(echo 'System.out.println(System.getProperty("file.encoding"))' | jshell -s -)"; [ "$fileEncoding" = 'UTF-8' ]; rm -rf ~/.java \
&& echo javac --version && javac --version \
&& echo java --version && java --version \
&& echo Complete.
CMD ["jshell"]
But it makes no sense, as the downloaded openJDK uses libc
and not musl
.
So of course when you try jshell
you get:
file jshell
jshell: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 3.2.0, not stripped
/opt/java/openjdk/bin # ldd jshell
/lib/ld-linux-armhf.so.3 (0xb6ed3000)
libz.so.1 => /lib/libz.so.1 (0xb6eb2000)
libjli.so => ./../lib/libjli.so (0xb6e94000)
libpthread.so.0 => /lib/ld-linux-armhf.so.3 (0xb6ed3000)
libdl.so.2 => /lib/ld-linux-armhf.so.3 (0xb6ed3000)
libc.so.6 => /lib/ld-linux-armhf.so.3 (0xb6ed3000)
Error loading shared library ld-linux-armhf.so.3: No such file or directory (needed by ./../lib/libjli.so)
Error relocating ./../lib/libjli.so: __rawmemchr: symbol not found
Error relocating ./../lib/libjli.so: __xstat: symbol not found
Error relocating ./../lib/libjli.so: __fxstat: symbol not found
Error relocating ./../lib/libjli.so: __strdup: symbol not found
/opt/java/openjdk/bin # ll /lib/ld-musl-armhf.so.1
As long as there isn't any binary package for armv7
and Alpine, we won't be able to build any Docker image with it. 🤷
from containers.
Related Issues (20)
- armv7 docker images for OpenJDK 21 HOT 8
- [Bug]: eclipse-temurin:17.0.10_7-jre uses ubuntu 22.04 which has several vulnerabilities HOT 2
- [Bug]: SSL Handshake exception using JDK 21 Alpine image HOT 3
- - HOT 1
- Ubuntu Noble flavor? HOT 7
- Add Multi-JDK images for testing purposes
- Update documentation for CA certificate support changes HOT 5
- {Enhancement] Request for Docker Builds of OpenJDK for Ubuntu Noble (24.04) HOT 1
- [Bug]: not able to build the image HOT 2
- [Bug]: Not able to pull images from this repository HOT 1
- Support for arm64, temurin 17 and alpine? HOT 3
- Distroless image support?
- Create a companion container for CA certificate handling HOT 2
- eclipse-temurin:17-jre-alpine vulnerabilities HOT 5
- Alpine 3.20? HOT 1
- [Bug]: Error building with temurin-17: adduser not found HOT 8
- [Bug]: Importing Ca certificates with USE_SYSTEM_CA_CERTS is slower than it used to be HOT 14
- [Bug]: laest eclipse-temurin:22-jdk already has user and group at id 1000 HOT 2
- [Bug]: 8-jdk still builds on Jammy - intentional? HOT 1
- [Bug]: curl & libcurl are missing from all the 22-jdk Ubuntu images HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from containers.