Java 14, Spring Boot 2, Gradle, Docker multi-stage
Requirements
docker
(version 18.09 or newest)
How to do
- Build
export BUILDKIT_PROGRESS=plain
export DOCKER_BUILDKIT=1
docker build -t andreformento/backend .
- Run
docker run --rm -p 8080:8080 --name andreformento-backend andreformento/backend
- Get
Request
curl -X GET localhost:8080/products
Response
[
{
"id":"ab1a3cd2-21cb-40ac-8e5c-14408e19b807",
"title":"Product 1"
},
{
"id":"bb042c03-7c8f-4578-842e-c11701ef4afd",
"title":"Product 2"
}
]