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

358
Views
Best practice for maintainig container base OS

I am working to containerize our spring boot microservice based application using docker.

While trying to write the docker image I have noticed about base OS.

What is the industry standard to deploy docker containers to production environments using official images from docker hub.

eg:oracle/open jdk

Will the official images take care vulnerabilities and fixes?...Do we have to take care vulnerabilities in base OS as well?.

Note:We are regularly performing OS patching in host OS

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The "OS" on which a Docker Image is based is user-land stuff only, so not really an OS in the the traditional sense. You cannot compare the risk of not keeping that one fully updated with the risk of not keeping a real OS fully updated.

In any case: One way to mitigate your concern is to use a distroless image as recommended by Google. The reason is that your application is Java-based, it doesn't really need all that user-land stuff from whatever Linux distro.

Another advantage of using a distroless image is that the Docker image size becomes much smaller.

Goggle has written a few words on how they keep their distroless Docker images updated. Google is basing their images on Debian. You may wonder why there's a base OS mentioned, in this case Debian, when at the same time claiming that the image is "distroless". Well, a Java application doesn't need a Shell, nor does it need any executables from the OS. It doesn't need grep, find and so on. However, it does need certain OS libraries to be there. And these libraries need to come from somewhere, in this case Google has chosen Debian. For you as the consumer of the image it is completely irrelevant that it is Debian.

Bear in mind that if your Java application actually actively touches the OS (by calling an external OS command from within Java) then you cannot use the distroless strategy. But very, very few Java applications do that and most Java devs would consider it an anti-pattern as it violates the WORA principle.

All in all - for the scenario you depict - I would go with Google's Distroless images rather than using the official openjdk image.

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!