I am trying to develop a sample Spring Boot microservice using PostgreSQL database connection. And I need to deploy it into AWS ECS container service. My doubt is that I need to build image for Java + PostgreSQL, and I need to push into AWS ECS repository.
How I can merge both Java and PostgreSQL base images into one using my Dockerfile? I only used java:8 at FROM clause in the Dockerfile. I need to build one Docker image for both Java + PostgreSQL.