Skip to content
Open
Show file tree
Hide file tree
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
128 changes: 128 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
### Java template
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### Maven template
target/
pom.xml.tag
pom.xml.releaseBackup
pom.xml.versionsBackup
pom.xml.next
release.properties
dependency-reduced-pom.xml
buildNumber.properties
.mvn/timing.properties
# https://github.com/takari/maven-wrapper#usage-without-binary-jar
.mvn/wrapper/maven-wrapper.jar

# Eclipse m2e generated files
# Eclipse Core
.project
# JDT-specific (Eclipse Java Development Tools)
.classpath

### JEnv template
# JEnv local Java version configuration file
.java-version

# Used by previous versions of JEnv
.jenv-version

### Eclipse template
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
.recommenders

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# PyDev specific (Python IDE for Eclipse)
*.pydevproject

# CDT-specific (C/C++ Development Tooling)
.cproject

# CDT- autotools
.autotools

# Java annotation processor (APT)
.factorypath

# PDT-specific (PHP Development Tools)
.buildpath

# sbteclipse plugin
.target

# Tern plugin
.tern-project

# TeXlipse plugin
.texlipse

# STS (Spring Tool Suite)
.springBeans

# Code Recommenders
.recommenders/

# Annotation Processing
.apt_generated/
.apt_generated_test/

# Scala IDE specific (Scala & Java development for Eclipse)
.cache-main
.scala_dependencies
.worksheet

# Uncomment this line if you wish to ignore the project description file.
# Typically, this file would be tracked if it contains build/dependency configurations:
#.project

### JDeveloper template
# default application storage directory used by the IDE Performance Cache feature
.data/

# used for ADF styles caching
temp/

# default output directories
classes/
deploy/
javadoc/

# lock file, a part of Oracle Credential Store Framework
cwallet.sso.lck
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,22 @@
FROM eclipse-temurin:11-jdk-focal
FROM maven:3.9.9-eclipse-temurin-11-focal AS builder

ENV MAVEN_OPTS="-Dmaven.repo.local=/opt/maven"
ENV M2_HOME="/opt/maven/m2"

WORKDIR /project
COPY . /project

RUN --mount=type=cache,target=/opt/maven/m2 mvn clean package -DskipTests

FROM eclipse-temurin:11-jdk-focal AS runtime
LABEL authors="jens"

# Set working directory
WORKDIR /app

# Copy jar with dependencies
COPY target/CorrelationDetective-1.0-jar-with-dependencies.jar /app/cd.jar
# Copy fat jar
COPY --from=builder /project/target/CorrelationDetective-1.0-jar-with-dependencies.jar /app/cd.jar

# Create a directory to store input data
RUN mkdir /app/data

# Set the entrypoint to running the jar file
ENTRYPOINT ["java", "-cp", "cd.jar", "core/Main"]
Expand Down