Merge pull request #1713 from jberggg/jdk11_docker_image

restserver docker image: set jdk17 for all platforms
This commit is contained in:
eikek 2022-08-26 10:34:24 +02:00 committed by GitHub
commit 7c0f9d057f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,21 +1,19 @@
FROM alpine:3.14 FROM alpine:3.16
ARG version= ARG version=
ARG restserver_url= ARG restserver_url=
ARG TARGETPLATFORM ARG TARGETPLATFORM
RUN JDKPKG="openjdk11-jre"; \ RUN apk update && \
if [[ $TARGETPLATFORM = linux/arm* ]]; then JDKPKG="openjdk8-jre"; fi; \ apk add --no-cache openjdk17-jre bash tzdata curl && \
apk update && \
apk add --no-cache $JDKPKG bash tzdata && \
apk add 'zlib=1.2.12-r3' apk add 'zlib=1.2.12-r3'
WORKDIR /opt WORKDIR /opt
RUN wget ${restserver_url:-https://github.com/eikek/docspell/releases/download/v$version/docspell-restserver-$version.zip} && \ RUN curl -L -O ${restserver_url:-https://github.com/eikek/docspell/releases/download/v$version/docspell-restserver-$version.zip} && \
unzip docspell-restserver-*.zip && \ unzip docspell-restserver-*.zip && \
rm docspell-restserver-*.zip && \ rm docspell-restserver-*.zip && \
ln -snf docspell-restserver-* docspell-restserver && \ ln -snf docspell-restserver-* docspell-restserver && \
rm docspell-restserver/conf/docspell-server.conf rm docspell-restserver/conf/docspell-server.conf
ENTRYPOINT ["/opt/docspell-restserver/bin/docspell-restserver", "-J-XX:+UseG1GC"] ENTRYPOINT ["/opt/docspell-restserver/bin/docspell-restserver", "-J-XX:+UseG1GC"]
EXPOSE 7880 EXPOSE 7880