docspell/docker/dockerfiles/restserver.dockerfile
eikek 5cd5ba46af Another try fixing the zlib issue in docker images
zlib 1.2.12-r0 is not working with openjdk, it affects the checksum
calculation of the db migrations. It must be at least 1.2.12-r1. For
some reason joex has this newer version, but the restserver image not.
They are installed explicitely now on both images.

That's why the migration is now disabled on rest-server in the
docker-compose file. It is ok if this is run on one server. It can now
happen that on first start joex is migrating the db and the restserver
tries to do things that don't work yet - it is a corner case. This is
removed with the next version.

Refs: #1517
2022-05-25 23:49:58 +02:00

25 lines
828 B
Docker

FROM alpine:3.14
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 && \
apk add 'zlib=1.2.12-r1'
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
ENTRYPOINT ["/opt/docspell-restserver/bin/docspell-restserver", "-J-XX:+UseG1GC"]
EXPOSE 7880
HEALTHCHECK --interval=1m --timeout=10s --retries=2 --start-period=30s \
CMD wget --spider http://localhost:7880/api/info/version