# d2ce1280956cab48005b64a2fbb1c34ac1ab7dce20a984dff49b7c65622a60e4
# Dockerfile generated by Maru 0.1.1

# Staged build using builder container
FROM janeliascicomp/builder:1.2.1 as builder
ARG STITCHING_SPARK_GIT_TAG=master

# Checkout and build the code
WORKDIR /tmp/app
RUN git clone --branch $STITCHING_SPARK_GIT_TAG --depth 1 https://github.com/saalfeldlab/stitching-spark.git . \
    && git submodule update --init --recursive \
    && /usr/local/bin/buildinfo.sh \
    && mvn package

# Find the built jar, based on the version in the pom file
RUN xq -r '.project.artifactId+"-"+.project.version+".jar"' pom.xml > filename \
    && mv /tmp/app/target/`cat filename` app.jar

# Create final image
FROM multifish/spark:3.0.1-hadoop3.2

WORKDIR /app
COPY --from=builder /tmp/app/app.jar /app/app.jar
COPY --from=builder /buildinfo /

