Member-only story
Dockerizing a Java 24 Project with Docker Init
Hello Wowlrd!
I’m starting a new series called “Docker Hour,” where I’ll publish a new Docker-related article every week. In the beginning, I’ll publish a new article every two weeks, for a total of 10 articles. I wanted to call the series “Docker Deca,” but I’m just making up too many names.
Later, I’ll give a talk at PlatformCon named:
Bake a Docker Cake:
10 Docker Commands You Didn’t Know About
It’s going to be about these 10 commands. So, let’s init!
Docker Init
Docker Init was a new command introduced in Docker Desktop 4.27 (for comparison, currently, the latest version is 4.40). It’s a “smart” command that helps you Dockerize your project. It does the following:
- Creates a Dockerfile
- Creates a
docker-compose.yml
file (well, they call itcompose.yaml
to be more of a cool guy) - Creates a
.dockerignore
file - Creates a README file with instructions on how to run the project
It’s great stuff! Let’s see it in action.
Technical Requirements
- Docker Desktop 4.27 or later