Not working yet

This commit is contained in:
RealStickman 2022-09-01 16:09:30 +02:00
parent 01f136e1fa
commit f0f34507ec

View File

@ -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 alpine:3.16.2
# FROM ubuntu:focal
COPY --from=copytask /Kavita /kavita ENV KAVITA_VERSION="0.5.5"
COPY --from=copytask /files/wwwroot /kavita/wwwroot
# Installs program dependencies # use musl package
#RUN apt-get update \ 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
# && apt-get install -y libicu-dev libssl1.1 libgdiplus curl \
# && rm -rf /var/lib/apt/lists/* # 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 # in /etc/apk/repositories
# enable 3.16/community repo # enable 3.16/community repo
# enable edge/testing repo (with tag @testing) # enable edge/testing repo (with tag @testing)
# https://wiki.alpinelinux.org/wiki/Package_management#Repository_pinning # 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 \ RUN apk add \
icu-dev libssl1.1 curl \ icu-dev libssl1.1 curl \
libgdiplus@testing 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" ] ENTRYPOINT [ "/bin/ash" ]
CMD ["/entrypoint.sh"] CMD ["/entrypoint.sh"]