Hi All,
Today I'm sharing my learning on how to write a sample DockerFile for a Java Container.
Pre-Requisite:
1. Docker to be installed
2. Decide a existing docker image to which you want to work upon: mostly as OS image on which we will work upon.
3. Download Oracle JDK on your local machine: you will need it upload the JDK to the container.
Breakdown of the file.
FROM : Here we can either pass the Image ID or Image Name
COPY : JDK & jar to the docker image.
RUN: Execute the unzip command to JDK installation path.
ENV: Set JAVA_HOME and Updated Path of the image.
ENTRYPOINT: start point of image.
No comments:
Post a Comment