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
82 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,910 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, 2019 in Docker by Sirajul
• 52,710 points
3,979 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,370 points
91 views
0 votes
1 answer

Can I give an advance instructions to run later, during the next build stage in docker?

You can definitely give a trigger instruction ...READ MORE

answered Jul 2, 2019 in Docker by Sirajul
• 52,710 points
85 views
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,530 points
526 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,910 points
413 views
+2 votes
6 answers

copy directories in docker container excluding any one directory

One of the way could be copy ...READ MORE

answered Dec 10, 2018 in Docker by Prateek
11,471 views