Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

277
Views
Build a multiplatform JDK/Tomcat docker image to be able to run on Apple Silicon

We build docker images with tomcat services within our CI as follows:

- PLATFORMS: linux/amd64,linux/arm64/v8
- gradle build …
# Switch to use different docker driver which supports multiplatform builds
- docker buildx create --use
- docker buildx build --push --platform=$PLATFORMS -t $image -f infra/Dockerfile .

This works and pushes the image which can easily be run on linux/amd64 platforms.

However when running this image on Apple Silicon, it fails with:

org.apache.catalina.startup.ContextConfig
Failed to detect ServletContainerInitializers for context with name [] service 
java.net.MalformedURLException: no !/ found in url spec:file:/usr/local/tomcat/lib/tomcat-websocket.jar!/META-INF/services/javax.servlet.ServletContainerInitializer

Full stack trace here: https://gist.github.com/knyttl/c8f2c24ac3d94a91911ca08f08eff668

What surprises me a bit is:

org.apache.catalina.startup.VersionLoggerListener Architecture:          amd64

I guess the architecture should be linux/arm64/v8, so why does it run the wrong one?

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

In the end, I abandoned the CI way of building M1 images.

Instead, I have written a bash script (to be run locally on M1) which extracts the CI-built image and rebuilds an M1 image with the CI-built image contents. Not exactly nice, but it works.

over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!