docspell/docker/dockerfiles/restserver.dockerfile
eikek 26847dc970 Remove default config file in docker images
Since this file cannot be changed inside the image, and people need to
specify a new file or env variables, it doesn't make sense to add it.
Also if it is present, it is preferred to the env variables.
2021-10-25 11:27:17 +02:00

23 lines
772 B
Docker

FROM alpine:latest
ARG version=
ARG restserver_url=
ARG TARGETPLATFORM
RUN JDKPKG="openjdk11"; \
if [ "$TARGETPLATFORM" = "linux/arm/v7" ]; then JDKPKG="openjdk8"; fi; \
apk add --no-cache $JDKPKG bash tzdata
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