diff --git a/Dockerfile b/Dockerfile index 90c172a44..9b27efd64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 diff --git a/automation.sh b/automation.sh new file mode 100644 index 000000000..510be42fc --- /dev/null +++ b/automation.sh @@ -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 +