0

I have a java project built with Restlet Framework. The Project consist of a java file with Server code and other files that are the routes that handle the request. I have made jar of my project. This jar is running on my machine. I want to put my jar on Docker Cloud.

I need help with the scripts in sequence that I need to run on docker terminal to host my jar on docker cloud.

My Dockerfile Code:

FROM openjdk

EXPOSE 8080

ADD ./MagicianServer.jar /srv/Server.jar

CMD java -jar MagicianServer.jar
Roman
  • 19,581
  • 6
  • 68
  • 84
Prateek Sharma
  • 127
  • 1
  • 11
  • Would you mind including what you have so far in terms of scripts and what you're having trouble getting to run? – Roman Nov 16 '16 at 21:50
  • @R0MANARMY : I have updated the details. Please review. – Prateek Sharma Nov 17 '16 at 19:50
  • The java code isn't especially useful. I meant did you already write a Dockerfile to create an image with this jar in it? – Roman Nov 17 '16 at 19:54
  • @R0MANARMY: Please check the update 2 with dockerfile content. – Prateek Sharma Nov 18 '16 at 09:33
  • Hey, I hope you don't mind, I removed the Java stuff out of your question since it wasn't really relevant to deploying the application to docker-cloud. Also, it looks like you may have a typo/mistake in your Dockerfile, you copy the jar in as *Server* but try to run *MagicianServer*. – Roman Nov 18 '16 at 14:47
  • Thanks. I will try and let you know. – Prateek Sharma Nov 18 '16 at 22:08

0 Answers0