mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-18 05:25:50 +00:00
Copy the jar to execute
This commit is contained in:
parent
a5c39a50cf
commit
d69f11b76f
2 changed files with 4 additions and 5 deletions
|
@ -9,9 +9,9 @@ COPY . .
|
||||||
# Build the project
|
# Build the project
|
||||||
RUN mvn package -Dskip.failsafe.tests -q --batch-mode
|
RUN mvn package -Dskip.failsafe.tests -q --batch-mode
|
||||||
|
|
||||||
# Make the jar executable
|
# Copy and make the jar executable
|
||||||
RUN sh -c 'touch target/spring-petclinic-*.jar'
|
RUN sh -c 'cp target/spring-petclinic-*.jar app.jar && touch app.jar'
|
||||||
|
|
||||||
#Start the project
|
#Start the project
|
||||||
ENV JAVA_OPTS=""
|
ENV JAVA_OPTS=""
|
||||||
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar target/spring-petclinic-*.jar" ]
|
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar app.jar" ]
|
||||||
|
|
|
@ -5,9 +5,8 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080"
|
||||||
links:
|
links:
|
||||||
# - mysql:mysql
|
|
||||||
- selenium
|
- selenium
|
||||||
command: java -jar ./target/*.jar
|
# - mysql:mysql
|
||||||
# mysql:
|
# mysql:
|
||||||
# image: mysql
|
# image: mysql
|
||||||
# ports:
|
# ports:
|
||||||
|
|
Loading…
Reference in a new issue