diff --git a/alpine.dockerfile b/alpine.dockerfile index a0ab436..e76407a 100644 --- a/alpine.dockerfile +++ b/alpine.dockerfile @@ -1,46 +1,40 @@ -# This Dockerfile creates a build for all architectures +# This Dockerfile creates an alpine container for x64 architectures -# Image that copies in the files and passes them to the main image -FROM alpine:3.16.2 AS copytask -#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 - -# Production image FROM alpine:3.16.2 -# FROM ubuntu:focal -COPY --from=copytask /Kavita /kavita -COPY --from=copytask /files/wwwroot /kavita/wwwroot +ENV KAVITA_VERSION="0.5.5" -# Installs program dependencies -#RUN apt-get update \ -# && apt-get install -y libicu-dev libssl1.1 libgdiplus curl \ -# && rm -rf /var/lib/apt/lists/* +# 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 + +# extract release +RUN tar xf kavita-linux-musl-x64.tar.gz + +# remove archive +RUN rm kavita-linux-musl-x64.tar.gz # 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 +RUN echo '@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories -# Use musl package - +# install kavita dependencies RUN apk add \ icu-dev libssl1.1 curl \ libgdiplus@testing -COPY entrypoint.sh /entrypoint.sh +# get entrypoint script from my repo +RUN wget https://github.com/RealStickman/Kavita/blob/rs_alpine/entrypoint.sh -O /entrypoint.sh +RUN chmod +x /entrypoint.sh -EXPOSE 5000 +RUN ls -l / +RUN ls -l /Kavita -WORKDIR /kavita +EXPOSE 5000/tcp + +# change working directory to "/Kavita" +WORKDIR /Kavita ENTRYPOINT [ "/bin/ash" ] CMD ["/entrypoint.sh"]