Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save kayode-adechinan/09a0698eed3c2afae23580df8ad9fd1d to your computer and use it in GitHub Desktop.
Save kayode-adechinan/09a0698eed3c2afae23580df8ad9fd1d to your computer and use it in GitHub Desktop.
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"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment