- Maven
- Java 8
- Docker for Windows or Mac
-
cd <project dir>
-
mvn clean install
-
Make sure docker is running i.e.
docker ps
-
build the image
docker build .
-
or build image with a tag
docker build -t <docker-hub-name>/<image-name>
-
Next step is to run the image
docker run -p 8080:8080 <image-id> or <docker-hub-name>/<image-name>
-
Go to browser and type
localhost:8080
we should see landing page of our app
Verify
docker ps
-> should show the current container running