Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

restserver docker image: set jdk17 for all platforms #1713

Merged
merged 1 commit into from
Aug 26, 2022
Merged
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
18 changes: 8 additions & 10 deletions docker/dockerfiles/restserver.dockerfile
Original file line number Diff line number Diff line change
@@ -1,21 +1,19 @@
FROM alpine:3.14
FROM alpine:3.16

ARG version=
ARG restserver_url=
ARG TARGETPLATFORM

RUN JDKPKG="openjdk11-jre"; \
if [[ $TARGETPLATFORM = linux/arm* ]]; then JDKPKG="openjdk8-jre"; fi; \
apk update && \
apk add --no-cache $JDKPKG bash tzdata && \
RUN apk update && \
apk add --no-cache openjdk17-jre bash tzdata curl && \
apk add 'zlib=1.2.12-r3'

WORKDIR /opt
RUN wget ${restserver_url:-https://github.com/eikek/docspell/releases/download/v$version/docspell-restserver-$version.zip} && \
unzip docspell-restserver-*.zip && \
rm docspell-restserver-*.zip && \
ln -snf docspell-restserver-* docspell-restserver && \
rm docspell-restserver/conf/docspell-server.conf
RUN curl -L -O ${restserver_url:-https://github.com/eikek/docspell/releases/download/v$version/docspell-restserver-$version.zip} && \
unzip docspell-restserver-*.zip && \
rm docspell-restserver-*.zip && \
ln -snf docspell-restserver-* docspell-restserver && \
rm docspell-restserver/conf/docspell-server.conf

ENTRYPOINT ["/opt/docspell-restserver/bin/docspell-restserver", "-J-XX:+UseG1GC"]
EXPOSE 7880
Expand Down