Building Images

  • You can also define your own images pretty easily
  • The definitions usually goes in a "Dockerfile"
  • Define the starting point for where to build from
  • Use sequential commands to define the desired environment state
  • Run the build with docker build .
FROM maven:3.8.4-openjdk-17

WORKDIR /app
COPY ./pom.xml /app
COPY src /app/src
RUN mvn package
CMD java -jar data.jar

14 / 24