Kavita/Dockerfile
Chris Plaatjes c8e3824032
Added check for Windows builds so copy works (#528)
* Added check for Windows builds so copy works

* Removed appsettings copy, no longer needed

* Fixed a bad build due to duplicate file copy

Co-authored-by: Joseph Milazzo <joseph.v.milazzo@gmail.com>
2021-08-27 11:40:33 -07:00

38 lines
895 B
Docker

#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
#Production image
FROM ubuntu:focal
COPY --from=copytask /Kavita /kavita
COPY --from=copytask /files/wwwroot /kavita/wwwroot
#Installs program dependencies
RUN apt-get update \
&& apt-get install -y libicu-dev libssl1.1 pwgen libgdiplus \
&& rm -rf /var/lib/apt/lists/*
#Creates the data directory
RUN mkdir /kavita/data
RUN sed -i 's/Data source=kavita.db/Data source=data\/kavita.db/g' /kavita/appsettings.json
COPY entrypoint.sh /entrypoint.sh
EXPOSE 5000
WORKDIR /kavita
ENTRYPOINT ["/bin/bash"]
CMD ["/entrypoint.sh"]