-
Notifications
You must be signed in to change notification settings - Fork 71
/
Copy pathDockerfile
45 lines (34 loc) · 1.43 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
41
42
43
44
45
FROM debian:buster-slim AS download
RUN apt update && apt install -y wget
WORKDIR /deb
RUN wget -O /deb/fonts-ubuntu_0.83-2_all.deb http://mirrors.kernel.org/ubuntu/pool/main/f/fonts-ubuntu/fonts-ubuntu_0.83-2_all.deb && \
wget -O /deb/ttf-ubuntu-font-family_0.83-2_all.deb http://mirrors.kernel.org/ubuntu/pool/universe/f/fonts-ubuntu/ttf-ubuntu-font-family_0.83-2_all.deb
FROM node:10.24.1-buster-slim AS build
RUN npm install -g [email protected]
WORKDIR /app
COPY ./package*.json /app
RUN npm install
COPY . /app
RUN gulp release
FROM scratch AS export
COPY --from=build /app/monitorrent-*.zip .
FROM scratch AS mount
COPY . /app
FROM python:3.9.11-slim-bullseye
MAINTAINER Alexander Puzynia <[email protected]>
# For docker layers cahcing it is better to install Playwight first with all dependencies
COPY --from=download /deb /deb
RUN dpkg -i /deb/fonts-ubuntu_0.83-2_all.deb && \
dpkg -i /deb/ttf-ubuntu-font-family_0.83-2_all.deb && \
rm -rf /deb/*.deb && \
pip install playwright==1.31.1 && \
playwright install --with-deps firefox
# requirements.txt is changed not often and again for caching let's install it first
COPY ./requirements.txt /var/www/monitorrent/
RUN pip install --no-cache-dir -r /var/www/monitorrent/requirements.txt && \
pip install --no-cache-dir PySocks
# Copy update application
COPY --from=build /app/dist /var/www/monitorrent
WORKDIR /var/www/monitorrent
EXPOSE 6687
CMD ["python", "server.py"]