Merged Dockerfiles (#282)
* Dockerfile re-imagined to handle all flavors in one script.
This commit is contained in:
parent
41a5d1bf2c
commit
d00cf7de92
6 changed files with 130 additions and 103 deletions
34
Dockerfile
34
Dockerfile
|
|
@ -1,35 +1,27 @@
|
|||
#This Dockerfile pulls the latest git commit and builds Kavita from source
|
||||
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS builder
|
||||
|
||||
MAINTAINER Chris P
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
#Installs nodejs and npm
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - \
|
||||
&& apt-get install -y nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#Builds app based on platform
|
||||
COPY build_target.sh /build_target.sh
|
||||
RUN /build_target.sh
|
||||
#This Dockerfile creates a build for all architectures
|
||||
|
||||
#Production image
|
||||
FROM ubuntu:focal
|
||||
FROM ubuntu:focal AS copytask
|
||||
|
||||
MAINTAINER Chris P
|
||||
ARG TARGETPLATFORM
|
||||
|
||||
#Move the output files to where they need to be
|
||||
COPY --from=builder /Projects/Kavita/_output/build/Kavita /kavita
|
||||
RUN mkdir /files
|
||||
COPY _output/*.tar.gz /files/
|
||||
COPY copy_runtime.sh /copy_runtime.sh
|
||||
RUN /copy_runtime.sh
|
||||
|
||||
FROM ubuntu:focal
|
||||
|
||||
COPY --from=copytask /kavita /kavita
|
||||
|
||||
#Installs program dependencies
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y libicu-dev libssl1.1 pwgen \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#Creates the manga storage directory
|
||||
RUN mkdir /manga /kavita/data
|
||||
#Creates the data directory
|
||||
RUN mkdir /kavita/data
|
||||
|
||||
RUN cp /kavita/appsettings.Development.json /kavita/appsettings.json \
|
||||
&& sed -i 's/Data source=kavita.db/Data source=data\/kavita.db/g' /kavita/appsettings.json
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue