From 9cb8dde9b8b70218cb666447cbf1342bce7a473c Mon Sep 17 00:00:00 2001 From: Dave Syer Date: Mon, 10 Jan 2022 10:46:26 +0000 Subject: [PATCH] Add section on building a container --- readme.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/readme.md b/readme.md index 5314355..a68cf50 100644 --- a/readme.md +++ b/readme.md @@ -28,6 +28,14 @@ Or you can run it from Maven directly using the Spring Boot Maven plugin. If you > NOTE: If you prefer to use Gradle, you can build the app using `./gradlew build` and look for the jar file in `build/libs`. +## Building a Container + +There is no `Dockerfile` in this project. You can build a container image (if you have a docker daemon) using the Spring Boot build plugin: + +``` +./mvnw spring-boot:build-image +``` + ## In case you find a bug/suggested improvement for Spring Petclinic Our issue tracker is available here: https://github.com/spring-projects/spring-petclinic/issues @@ -44,6 +52,11 @@ You could start MySQL or PostgreSQL locally with whatever installer works for yo ``` docker run -e MYSQL_USER=petclinic -e MYSQL_PASSWORD=petclinic -e MYSQL_ROOT_PASSWORD=root -e MYSQL_DATABASE=petclinic -p 3306:3306 mysql:5.7.8 +``` + +or + +``` docker run -e POSTGRES_USER=petclinic -e POSTGRES_PASSWORD=petclinic -e POSTGRES_DB=petclinic -p 5432:5432 postgres:14.1 ```