mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-19 14:05:50 +00:00
Merge 1150242031
into 5f7574570e
This commit is contained in:
commit
f33191e63c
2 changed files with 25 additions and 0 deletions
11
Dockerfile
Normal file
11
Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM maven:3.5-jdk-8-alpine
|
||||
COPY . /src
|
||||
WORKDIR /src
|
||||
RUN mvn install
|
||||
|
||||
FROM openjdk:8-jre-alpine
|
||||
WORKDIR /app
|
||||
EXPOSE 8080
|
||||
ENV VERSION=2.0.0.BUILD-SNAPSHOT
|
||||
COPY --from=0 /src/target/spring-petclinic-$VERSION.jar /app/spring-petclinic.jar
|
||||
CMD ["java", "-jar", "spring-petclinic.jar"]
|
14
readme.md
14
readme.md
|
@ -18,6 +18,20 @@ You can then access petclinic here: http://localhost:8080/
|
|||
Our issue tracker is available here: https://github.com/spring-projects/spring-petclinic/issues
|
||||
|
||||
|
||||
## Running petclinic with Docker
|
||||
|
||||
Included is a multistage `Dockerfile` that will create a relatively small docker image containing Petclinic.
|
||||
|
||||
```bash
|
||||
git clone https://github.com/spring-projects/spring-petclinic.git
|
||||
cd spring-petclinic
|
||||
docker build -t spring/petclinic .
|
||||
docker run -p 8080:8080 spring/petclinic
|
||||
```
|
||||
|
||||
Once started you can browse to http://localhost:8080 to see the Petclinic.
|
||||
|
||||
|
||||
## Database configuration
|
||||
|
||||
In its default configuration, Petclinic uses an in-memory database (HSQLDB) which
|
||||
|
|
Loading…
Reference in a new issue