Add the Dockerfile and Makefile to run the server.

main
KKlochko 2 years ago
parent 4dc120bce8
commit 22e1506024

@ -0,0 +1,14 @@
FROM tomcat:9.0-jdk17-openjdk-slim
WORKDIR /usr/local/tomcat/webapps
# Remove the default Tomcat apps
RUN rm -rf ROOT* docs examples manager host-manager
COPY target/SpringRestExample.war /usr/local/tomcat/webapps/ROOT.war
EXPOSE 8080
# Start Tomcat
CMD ["catalina.sh", "run"]

@ -0,0 +1,13 @@
default: war build_image show
war:
./mvnw clean install -DskipTests=true
test:
./mvnw clean test
build_image:
podman build -t spring-rest-example .
show:
podman run -p 8080:8080 spring-rest-example
Loading…
Cancel
Save