Kavita Docker & Self-Hosted Deployment

GitHub

Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs.

1. Pull Image (DOCKERHUB) docker pull Kareadita/Kavita:latest
2. Docker Run (1-Click Launch) docker run -d --name kavita -p 5000:5000 --restart always kareadita/kavita:latest
3. Podman Run podman run -d --name kavita -p 5000:5000 --restart always kareadita/kavita:latest
4. Skopeo Inspect (Zero-Pull Manifest) skopeo inspect docker://docker.io/kareadita/kavita:latest
5. ORAS Pull (OCI Artifact) oras pull kareadita/kavita:latest
Dockerfile
#This Dockerfile creates a build for all architectures

#Image that copies in the files and passes them to the main image
FROM ubuntu:focal AS copytask

ARG TARGETPLATFORM

#Move the output files to where they need to be
RUN mkdir /files
COPY _output/*.tar.gz /files/
COPY UI/Web/dist /files/wwwroot
COPY copy_runtime.sh /copy_runtime.sh
RUN /copy_runtime.sh
RUN chmod +x /Kavita/Kavita

#Production image
FROM ubuntu:focal

COPY --from=copytask /Kavita /kavita
COPY --from=copytask /files/wwwroot /kavita/wwwroot
COPY API/config/appsettings.json /tmp/config/appsettings.json

#Installs program dependencies
RUN apt-get update \
  && apt-get install -y libicu-dev libssl1.1 libgdiplus curl \
  && rm -rf /var/lib/apt/lists/*

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

EXPOSE 5000

WORKDIR /kavita

HEALTHCHECK --interval=30s --timeout=15s --start-period=30s --retries=3 CMD curl --fail http://localhost:5000/api/health || exit 1

ENV DOTNET_RUNNING_IN_CONTAINER=true

ENTRYPOINT [ "/bin/bash" ]
CMD ["/entrypoint.sh"]