Categories
AWS Docker Java

AWS Elastic BeanStalk + Spring boot + Hibernate + MySQL

In this tutorial, we explain how to build a docker image that contains a Java Spring Boot REST API and JPA Hibernate ORM, to connect to an AWS RDS MySQL database. 1) Get started You can use our previous tutorial that explains how to use Spring Boot with Hibernate. The only things we will add […]

Categories
Docker Java

Run Java TestContainers using an image from a private AWS ECR registry

In this short tutorial, we will see how to easily run a private docker image using Java TestContainers. We will use a private AWS ECR registry, but the code will work the same with any other private registry. 1) Needed parameters First, you need to gather the following parameters: String registry = “601730646169.dkr.ecr.us-west-2.amazonaws.com”; String image […]

Categories
Docker Java SQL

Run PostgreSQL with Java and Testcontainers

In this tutorial, we will explain how to run PostgreSQL with Java and Testcontainers. Testcontainers is an awesome library that allows you to configure and start docker containers from Java. To run a PostgreSQL database, you need Docker on your machine. Add these dependencies to your pom.xml: Then, simply run: Replace databaseName, username and password […]