2022-09-01 16:09:30 +02:00
|
|
|
# This Dockerfile creates an alpine container for x64 architectures
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-01 16:09:30 +02:00
|
|
|
FROM alpine:3.16.2
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-02 19:41:10 +02:00
|
|
|
ENV KAVITA_VERSION="0.5.6"
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-01 16:09:30 +02:00
|
|
|
# use musl package
|
|
|
|
RUN wget https://github.com/Kareadita/Kavita/releases/download/v${KAVITA_VERSION}/kavita-linux-musl-x64.tar.gz -O kavita-linux-musl-x64.tar.gz
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-01 16:09:30 +02:00
|
|
|
# extract release
|
|
|
|
RUN tar xf kavita-linux-musl-x64.tar.gz
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-01 20:06:43 +02:00
|
|
|
# rename folder to lowercase
|
|
|
|
RUN mv /Kavita /kavita
|
|
|
|
|
2022-09-01 16:09:30 +02:00
|
|
|
# remove archive
|
|
|
|
RUN rm kavita-linux-musl-x64.tar.gz
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-08-30 19:02:29 +02:00
|
|
|
# in /etc/apk/repositories
|
|
|
|
# enable 3.16/community repo
|
|
|
|
# enable edge/testing repo (with tag @testing)
|
|
|
|
# https://wiki.alpinelinux.org/wiki/Package_management#Repository_pinning
|
2022-09-01 16:09:30 +02:00
|
|
|
RUN echo '@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
|
2022-08-30 19:02:29 +02:00
|
|
|
|
2022-09-01 16:09:30 +02:00
|
|
|
# install kavita dependencies
|
2022-09-03 14:43:29 +02:00
|
|
|
# icu
|
2022-09-03 15:16:37 +02:00
|
|
|
# vips
|
2022-08-30 19:02:29 +02:00
|
|
|
RUN apk add \
|
|
|
|
icu-dev libssl1.1 curl \
|
|
|
|
libgdiplus@testing
|
|
|
|
|
2022-09-01 16:09:30 +02:00
|
|
|
# get entrypoint script from my repo
|
2022-09-01 19:51:20 +02:00
|
|
|
RUN wget https://raw.githubusercontent.com/RealStickman/Kavita/rs_alpine/entrypoint.sh -O /entrypoint.sh
|
2022-09-01 16:09:30 +02:00
|
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
|
|
|
|
EXPOSE 5000/tcp
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-01 20:06:43 +02:00
|
|
|
# change working directory to "/kavita"
|
|
|
|
WORKDIR /kavita
|
2022-08-30 18:31:04 +02:00
|
|
|
|
2022-09-01 09:19:16 +02:00
|
|
|
ENTRYPOINT [ "/bin/ash" ]
|
2022-08-30 18:31:04 +02:00
|
|
|
CMD ["/entrypoint.sh"]
|