kayode-adechinan
6/22/2019 - 10:29 PM

docker_simplejavadockercompose_docker-compose.yml

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"]