DZone
Cloud Zone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
  • Refcardz
  • Trend Reports
  • Webinars
  • Zones
  • |
    • Agile
    • AI
    • Big Data
    • Cloud
    • Database
    • DevOps
    • Integration
    • IoT
    • Java
    • Microservices
    • Open Source
    • Performance
    • Security
    • Web Dev
DZone > Cloud Zone > Lightweight Docker Images for Java Apps

Lightweight Docker Images for Java Apps

If you're searching for a way to get your Docker images down to a more manageable size, it might just be easier to choose a different starting point.

Kevin Hooke user avatar by
Kevin Hooke
·
Jun. 20, 16 · Cloud Zone · Tutorial
Like (3)
Save
Tweet
3.87K Views

Join the DZone community and get the full member experience.

Join For Free

There are a number of posts (e.g. here) talking about the official Java Docker images being on the large side – in Docker terms. The standard images can be more than 600MB before you even build the image containing your app. That's… pretty big.

Suggestions are to use a smaller image as a starting point, like Alpine Linux. It looks like at some point the official Java images have been updated to include a number of Alpine based images, too.

Pulling down an OpenJDK 8 image, java:openjdk-8-jdk and then java:openjdk-8-alpine, there's a massive size difference between the size of the two:

If you're planning on running something lightweight like a Spring Boot app, it looks like the provided Alpine images are a good starting point.

app Docker (software) Java (programming language)

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Your Old Laptop Is Your New Database Server
  • An Overview of 3 Java Embedded Databases
  • Is Java Still Relevant?
  • 10 Steps to Become an Outstanding Java Developer

Comments

Cloud Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • MVB Program
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends:

DZone.com is powered by 

AnswerHub logo