curl http://localhost:8080/hello
docker image build -t akatkar/greeting .
docker container run -d -p 8080:8080 akatkar/greeting
docker container ls
docker container stop <CONTAINER_ID>
docker container rm <CONTAINER_ID>
Stop and removed command can be merged by force option
docker container rm -f <CONTAINER_ID>
JIB is an open source tool to build docker images and can be used with both maven and gradle.
Here is the quick start guide for gradle
Run following command to build image.
./gradlew jib --image=akatkar/greeting-jib
The image will be pushed to docker hub (or any specified docker registry) automatically
https://hub.docker.com/repository/docker/akatkar/greeting-jib/general