for exemple when you build you war with Spring boot, the path is /target/(APP_NAME}-{VERSION_NAME}.war
so replace to:
ADD {PATH_OF_WAR} {NAME_OF_WAR_FILE}
replace entrypoint with you war file name:
["java","-jar","-jar","{NAME_OF_WAR_FILE}"]
To build docker image with maven
mvn install dockerfile:build
(by default it create image with a tag 'latest': walterwhites/webservice:latest)
To list images
$ docker images
To delete images
$ docker image rm {IMAGE ID} --force
To login to Docker CLI
$ docker login -u "username" -p "password" docker.io
Content type
Image
Digest
Size
105.5 MB
Last updated
over 7 years ago
docker pull walterwhites/webservice