mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-25 09:05:50 +00:00
Create Dockerfile
This commit is contained in:
parent
ecb130f736
commit
8aab951c53
1 changed files with 17 additions and 0 deletions
17
Dockerfile
Normal file
17
Dockerfile
Normal file
|
@ -0,0 +1,17 @@
|
|||
FROM ubuntu:latest
|
||||
|
||||
# Install OpenJDK 17 and Maven
|
||||
RUN apt-get update && \
|
||||
apt-get -y install openjdk-17-jdk-headless maven
|
||||
|
||||
# Set working directory
|
||||
WORKDIR /app
|
||||
|
||||
# Copy code to container
|
||||
COPY . .
|
||||
|
||||
# Build application
|
||||
RUN ./mvnw package -Dmaven.test.skip=true
|
||||
|
||||
# Run application
|
||||
CMD ["java", "-jar", "target/*.jar"]
|
Loading…
Reference in a new issue