build an J2EE application with docker

0 votes
If I am building a J2EE using maven I need to mvn clean & mvn package and then upload the war file on the tomcat webapp. Is there any other way around like once I have changed the code, then the result will automatically show up when I access the ip of the container? Can anyone help me with this query?
May 1, 2018 in Docker by Atul
• 10,240 points
57 views

1 answer to this question.

0 votes

I would suggest you to use volume binding for what you want.It can be achieved by running

docker run -d -v $(pwd):/code-directory $(pwd)  for your local directory.

It is applicable for local environment.

I hope it will help you.

answered May 1, 2018 by shubham
• 6,890 points

Related Questions In Docker

0 votes
1 answer
0 votes
2 answers

How do I force Docker for a clean build of an image ?

You could try this inorder to clean ...READ MORE

answered Aug 6 in Docker by Sirajul
• 41,000 points
2,007 views
0 votes
1 answer

How to run an image with volume on docker for windows?

Try : declaring the volume of container mounting the ...READ MORE

answered Sep 19, 2018 in Docker by Tyrion anex
• 8,310 points
58 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,300 points
270 views
0 votes
1 answer

Enter in a Docker container already running with a new TTY?

Here is what you can try. For docker ...READ MORE

answered Oct 26, 2018 in Docker by shubham
• 6,890 points
210 views
+2 votes
6 answers