ReverseApp is an application made in Java 11 and Spring Boot that is exposed on port 8080 and that I have put inside a Docker container.
It is a web application that when making GET requests to "/" returns a JSON with a message that describes how to use it, request example using curl:
curl -s http://localhost:8080/ | jq '.'
And when making a GET request to "/reverse", and passing a text string in the "text" parameter, it returns a JSON with the same string in reverse , example request using curl:
curl -s http://localhost:8080/reverse?text=Hello%20World | jq '.'
To build the docker image, assuming we are located in the same directory where the Dockerfile is:
docker build -t <image_name>:<tag> .
To run a container and test it:
docker run --rm -d --name -p 8080:8080 <container-name> <image_name>:<tag>
For more details about container creation check out the GitHub Repository https://github.com/lacalvom/reverseapp-dockerized.git.
Content type
Image
Digest
sha256:36fef6cba…
Size
240.9 MB
Last updated
over 3 years ago
docker pull lacalvom/reverseapp