mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-20 14:55:50 +00:00
update docker and add an automation.sh
This commit is contained in:
parent
ecbab64972
commit
a94f441f44
2 changed files with 15 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
|||
# Use an official OpenJDK runtime as a parent image
|
||||
FROM openjdk:17-jdk-alpine
|
||||
FROM openjdk
|
||||
|
||||
# Set the working directory inside the container
|
||||
WORKDIR /app
|
||||
|
|
14
automation.sh
Normal file
14
automation.sh
Normal file
|
@ -0,0 +1,14 @@
|
|||
echo "####################################################"
|
||||
echo "Stop and remove all running containers..."
|
||||
echo "docker stop $(docker ps -a -q)"
|
||||
echo "docker system prune -af"
|
||||
docker stop $(docker ps -a -q)
|
||||
docker system prune -af
|
||||
|
||||
echo "####################################################"
|
||||
echo "Build and run container..."
|
||||
echo "build . -f spring_image"
|
||||
echo "docker run -itd --net=assignment2 -p:8080:8080 --name spring-clinic spring_image"
|
||||
docker build . -f spring_image
|
||||
docker run -itd --net=assignment2 -p:8080:8080 --name spring-clinic spring_image
|
||||
|
Loading…
Reference in a new issue