https://github.com/bretfisher/petclinic
  
  
    sample dockerization of a Java Spring Boot app 
    https://github.com/bretfisher/petclinic
  
        Last synced: 7 months ago 
        JSON representation
    
sample dockerization of a Java Spring Boot app
- Host: GitHub
 - URL: https://github.com/bretfisher/petclinic
 - Owner: BretFisher
 - Created: 2020-05-08T13:54:55.000Z (over 5 years ago)
 - Default Branch: master
 - Last Pushed: 2024-11-19T09:16:15.000Z (12 months ago)
 - Last Synced: 2025-04-12T18:13:24.795Z (7 months ago)
 - Language: Java
 - Homepage:
 - Size: 1.25 MB
 - Stars: 18
 - Watchers: 3
 - Forks: 26
 - Open Issues: 2
 - 
            Metadata Files:
            
- Readme: README.md
 
 
Awesome Lists containing this project
README
          # Spring PetClinic Dockerized
Demo of taking the [petclinic Java app](https://github.com/spring-petclinic/spring-petclinic-angularjs) and adding the proper Docker files to make it easier for dev, test, and prod.
Check the [`pet-clinic-app/Dockerfile`](pet-clinic-app/Dockerfile) for multi-stage building of a .jar with maven
Check the [`docker-compose.yml`](docker-compose.yml) for a full-featured Dev setup with depends_on using true "wait-for-it" style dependency startup
## Bugs
- This currently seems to skip startup of the `sprint-petclinic-client` frontend, or at least missing a lot of static assets (js/css). PR's welcome (not sure if it's an app issue, or a docker build/run issue)
## Features
- Multi-stage Dockerfile with a build, security scan, and prod stage
- docker-compose.yml file with proper waiting of database startup
## Other Docker and Compose Tips
1. Use ssh to easily control a Docker Engine on another OS
    Here's an example of pointing docker and docker compose at a remote docker engine.
    Also works for using docker cli on host OS while docker runs in Vagrant or any VM.
    `DOCKER_HOST=ssh://user@host docker image ls`
    `DOCKER_HOST=ssh://user@host docker-compose up`
2. Enable BuildKit in Docker and Compose
    This may speed up your builds and provides advanced features.
    ```
    export DOCKER_BUILDKIT=1
    export COMPOSE_DOCKER_CLI_BUILD=1
    ```