Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Use an official OpenJDK runtime as a parent image
FROM openjdk:8-jre-alpine
FROM maven:3-jdk-8-alpine

# set shell to bash
# source: https://stackoverflow.com/a/40944512/3128926
RUN apk update && apk add bash

# Set the working directory to /app
WORKDIR /app
WORKDIR /sources

# Copy the fat jar into the container at /app
COPY /target/docker-java-app-example.jar /app
COPY * /sources

RUN cd /sources && mvn clean package

# Make port 8080 available to the world outside this container
EXPOSE 8080

# Run jar file when the container launches
CMD ["java", "-jar", "docker-java-app-example.jar"]
CMD ["java", "-jar", "target/docker-java-app-example.jar"]