mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2026-02-11 00:51:12 +00:00
Update Dockerfile with entrypoint additions
Signed-off-by: lii5a <liisa.tallinn@gmail.com>
This commit is contained in:
parent
51a53691da
commit
117a1f3ef1
1 changed files with 12 additions and 1 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -67,4 +67,15 @@ EXPOSE 8080
|
|||
# CMD curl -fsS http://localhost:8080/ || exit 1
|
||||
|
||||
# Start the app
|
||||
ENTRYPOINT ["java", "-jar", "app.jar"]
|
||||
|
||||
# ---------- ADDITIONS FOR OPTION 2 LOG FORWARDING ----------
|
||||
|
||||
# Copy log-forwarding script into container
|
||||
COPY forward-logs.sh /app/forward-logs.sh
|
||||
|
||||
# Make the script executable
|
||||
RUN chmod +x /app/forward-logs.sh
|
||||
|
||||
# Run both PetClinic and log forwarder in same container
|
||||
ENTRYPOINT ["bash", "-c", "java -jar app.jar & /app/forward-logs.sh"]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue