Writing a Dockerfile for a simple Java application:
Let’s create a Dockerfile for the Oracle JDK, which is not available on Docker Hub. To begin this process, create a new folder and then create a file in it named “Dockerfile” with the following content.
# Dockerfile
FROM phusion/baseimage:0.9.17
MAINTAINER Author Name <author@email.com>
1. Update the package repository
RUN echo "deb http://archive.ubuntu.com/ubuntu trusty main universe" > /etc/apt/sources.list
RUN apt-get -y update
From:
https://runnable.com/docker/java/dockerize-your-java-application