Skip to content
Advertisement

Create Docker Image with Custom JDK

I’m attempting to create a Docker image for my custom JDK install. It’s simply the Jetbrains Runtime with Hotswap agent added to it. I’m new to docker images and creating a source image like this seems to be extra difficult to find clear documentation.

So far, I have this in my Dockerfile and I don’t really know where to go from here:

JavaScript

I’d appreciate any guidance on how to make this into an image that I can use in a Docker.

Thanks in advance!

Advertisement

Answer

Your Dockerfile /Containerfile has always to begin with: FROM. This indicates a base image as you already commented.

A base image is in most cases a minimalistic type of OS like: ubuntu, alpine, ubi from redhat etc. and it provides a filesystem, package manager etc. Thus it is possible to use commands like wget, mkdir, as you have in your file.

Your main application starts with CMD <yourexe "param1" "parama2" ...>

After defining you Dockerfile you can create the image file with docker build.

For Further information see: https://docs.docker.com/develop/develop-images/dockerfile_best-practices/

User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement