Dockerfile 1.13 KB
Newer Older
1
2
3
4
5
6
7
8
9
FROM debian:buster-slim AS build
ARG VERSION=4.1.5
WORKDIR /
RUN apt-get -qq update && \
    apt-get -qq install wget unzip && \
    apt-get clean
RUN wget -q https://github.com/cantaloupe-project/cantaloupe/releases/download/v${VERSION}/cantaloupe-${VERSION}.zip -O temp.zip && \
    unzip temp.zip && \
    mv cantaloupe-${VERSION} cantaloupe && \
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
10
    mv cantaloupe/deps/Linux-x86-64/lib /tmp/lib && \
11
12
13
14
15
16
    rm -r cantaloupe/deps && \
    rm cantaloupe/cantaloupe.properties.sample
ADD ./cantaloupe.properties /cantaloupe/cantaloupe.properties

FROM openjdk:11-jre-slim
ENTRYPOINT ["/home/cantaloupe/run.sh", "4.1.5"]
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
17
CMD ["-Dcantaloupe.config=/home/cantaloupe/app/cantaloupe.properties", "-Xmx2g"]
18
19
20
21
22
23
ARG HTTP_PORT=8182
HEALTHCHECK --start-period=30s CMD curl -sf 0.0.0.0:${HTTP_PORT} -o /dev/null || exit 1
RUN useradd cantaloupe
WORKDIR /home/cantaloupe
VOLUME ["/home/cantaloupe/images"]
COPY --chown=cantaloupe --from=build /cantaloupe/ app/
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
24
COPY --from=build /tmp/lib/* /usr/lib/
25
26
27
ADD --chown=cantaloupe ./run.sh run.sh
RUN apt-get -qq update && \
    apt-get -qq install curl && \
Sebastian Schüpbach's avatar
Sebastian Schüpbach committed
28
29
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*
30
USER cantaloupe