# Build stage FROM maven:3.9.9-eclipse-temurin-11 AS build WORKDIR /home/app COPY pom.xml . COPY src ./src RUN mvn clean package -DskipTests # Package stage FROM eclipse-temurin:11-jdk-alpine # Set timezone to Asia/Manila ENV TZ=Asia/Manila RUN apk add --no-cache tzdata && \ cp /usr/share/zoneinfo/Asia/Manila /etc/localtime && \ echo "Asia/Manilla" > /etc/timezone COPY --from=build /home/app/target/ims-0.0.1-SNAPSHOT.jar /usr/local/lib/ims.jar EXPOSE 3279 ENTRYPOINT ["java", "-Duser.timezone=Asia/Manila", "-jar", "/usr/local/lib/ims.jar"] #To build an image: #run "sudo docker image build -t gab-portal ." #**Note: Replace the w/ your desired image name # #To see the list of images: #run "sudo docker image ls" # #To run a container based on an image: #run "sudo docker run -d -p 3279:3279 gab-portal" #**Note: Replace the w/ your desired image name # #To display the list of containers: #run "sudo docker container ps -a" # #To remove a container/undeploying #run sudo docker rm -f # #To check docker directories #sudo docker exec -it ls