-
-
Notifications
You must be signed in to change notification settings - Fork 331
/
Dockerfile
40 lines (28 loc) · 1.02 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#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/browser /files/wwwroot
COPY copy_runtime.sh /copy_runtime.sh
RUN /copy_runtime.sh
RUN chmod +x /Kavita/Kavita
#Production image
FROM ubuntu:focal
COPY --from=copytask /Kavita /kavita
COPY --from=copytask /files/wwwroot /kavita/wwwroot
COPY API/config/appsettings.json /tmp/config/appsettings.json
#Installs program dependencies
RUN apt-get update \
&& apt-get install -y libicu-dev libssl1.1 libgdiplus curl \
&& rm -rf /var/lib/apt/lists/*
COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
EXPOSE 5000
WORKDIR /kavita
HEALTHCHECK --interval=30s --timeout=15s --start-period=30s --retries=3 CMD curl -fsS http://localhost:5000/api/health || exit 1
ENV DOTNET_RUNNING_IN_CONTAINER=true
ENTRYPOINT [ "/bin/bash" ]
CMD ["/entrypoint.sh"]