I am trying to follow a tutorial on getting up and running with Docker using a spring boot fat jar. I have everything installed and can run a Hello World example from Docker Hub.
I have created the fat jar using Maven called predictive-text-tree-0.0.1-SNAPSHOT.jar
and am using the following as my dokerfile.docker:
FROM java:8
MAINTAINER ltocode
EXPOSE 8080
ADD predictive-text-tree-0.0.1-SNAPSHOT.jar /data/predictive-text-tree-0.0.1-SNAPSHOT.jar
CMD java -jar /data/textpredict.jar
I have the jar and the docker file on the server, and when I run the docker build command I get the following:
~/build# docker build -t predictive-text-tree-0.0.1-SNAPSHOT.jar
invalid argument "predictive-text-tree-0.0.1-SNAPSHOT.jar" for t: Error parsing reference: "predictive-text-tree-0.0.1-SNAPSHOT.jar" is not a valid repository/tag See 'docker build --help'.
How do I build the docker image from a fat jar?