container

A collection of 8 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Apr 16, 2023 container kubernetes debug devops

Fearless Distroless

With the rise of Docker came a new focus for engineers: optimizing the build to reach the smallest image size possible. A couple of options are available. Multi-stage builds: A Dockerfile can consist of multiple steps, each having a different Docker base image. Each step can copy files from any of the previous build steps. Only the last one will receive a tag; the others will be left untagged. This approach separates one or more build steps and a run step.

Nicolas Fränkel
Dec 27, 2020 docker container jekyll ruby

Musings around a Dockerfile for Jekyll

If you like cool stories about how an engineer, faced with an impossible problem, overcame all odds and solved it, this post is not for you. This is a story of how I spent a non-trivial amount of time, how I hit a couple of walls, and how I nearly came back to square one. Why do I write it? The first reason is for me: I want to document my journey so if I ever think about trying again in the future, I’ll have some arguments against it.

Nicolas Fränkel
Oct 11, 2020 container docker spring boot

A Hitchhiker's Guide to Containerizing (Spring Boot) Java Apps

Containerizing an application based on a 'scripting' language is straightforward. Add the sources, download the dependencies, and you’re good to go. One could say they are WYSIWYR. With compiled languages in general, and Java in particular, things are a bit different. In this post, I’d like to list some alternatives to achieve that.

Nicolas Fränkel
Mar 1, 2020 kubernetes container initialization configuration

The versatility of Kubernetes' initContainer

There are a lot of different ways to configure containers running on Kubernetes: Environment variablesConfig mapsVolumes shared across multiple podsArguments passed to scheduled podsetc. Those alternatives fit a specific context, with specific requirements. For example, none of them allow you to clone a Git repository before the container starts. It would be possible to design that feature into the image itself.

Nicolas Fränkel
Jul 8, 2018 software design container dependency injection framework

On containers and frameworks

It seems pretty popular right now to bash widespread software design practices, e.g. dependency injection, frameworks, annotations, etc. While there are some downsides of adopting those practices, I believe there are more benefits. In that post, I’d like to address those points, and come up with arguments in favor.

Nicolas Fränkel
Aug 6, 2017 container build optimization

Strategies for optimizing Maven Docker images

Last week, I wrote on how to design a generic Docker image for Maven-based auto-executable webapps. The designed build file has 3 different stages: checkout from Github, build with Maven and execute with Java. The Maven build stage takes quite a long time, mostly due to: Executing testsDownloading dependencies Tests can be executed earlier in the build chain - then skipped for Docker, this post will focus on speeding up the download of the dependencies. Let’s check each option in turn.

Nicolas Fränkel
Jul 30, 2017 docker container build

A Dockerfile for Maven-based Github projects

Since the Docker 'revolution', I’ve been interested in creating a Dockefile for Spring applications. I’m far from an ardent practitioner, but the principle of creating the Dockerfile is dead simple. As in Java - or probably any programming language, however, while it’s easy to achieve something that works, it’s much harder to create something that works well.

Nicolas Fränkel
Sep 28, 2009 container dependency injection di ioc servlet spring

Spring can inject Servlets too!

In this article, I will show you that Spring dependency injection mechanism is not restricted solely to Spring-managed beans, that is Spring can inject its beans in objects created by the new keywords, servlets instantiated in the servlet container, and pretty anything you like.

Nicolas Fränkel
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts