andreformento / docker-multi-stage-with-java

Just an example with Java 14, Spring Boot 2, Gradle, Docker multi-stage

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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"
   }
]

References

About

Just an example with Java 14, Spring Boot 2, Gradle, Docker multi-stage


Languages

Language:Java 74.2%Language:Dockerfile 25.8%