version: '3'
services:
web:
build: .
ports:
- "8080:8080"
# Dockerfile
# Use an official Java runtime as a parent image
FROM openjdk:12
# Set the working directory to /app
WORKDIR /app
# Copy jar at /app
COPY ./build/libs/demo2-0.0.1-SNAPSHOT.jar /app
# EXPOSE 8080
EXPOSE 8080
# Run app.py when the container launches
CMD ["java", "-jar", "demo2-0.0.1-SNAPSHOT.jar"]