-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdockerfileForMac
51 lines (43 loc) · 1.29 KB
/
dockerfileForMac
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
46
47
48
49
50
51
# Linux Distribution
FROM python:3.9-buster
# Install dependencies and wkhtmltopdf
RUN apt-get update && \
apt-get install -y \
curl \
fontconfig \
libxrender1 \
libxext6 \
libfontconfig1 \
libjpeg62-turbo \
libssl1.1 \
xfonts-75dpi \
xfonts-base \
wget \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
# Install Node.js and npm
RUN curl -fsSL https://deb.nodesource.com/setup_16.x | bash - && \
apt-get install -y nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Copy the local wkhtmltopdf Debian package into the Docker image
COPY wkhtmltox_0.12.6-1.buster_arm64.deb /tmp/
# Install wkhtmltopdf from the local Debian package
RUN dpkg -i /tmp/wkhtmltox_0.12.6-1.buster_arm64.deb && \
apt-get -f install -y && \
rm /tmp/wkhtmltox_0.12.6-1.buster_arm64.deb && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Set up working directory and copy frontend code
WORKDIR /app/frontend
COPY frontend/ /app/frontend
RUN npm install --force
# Set up working directory and copy backend code
WORKDIR /app
COPY aru_venv/ /app
RUN pip install --no-cache-dir -r requirements.txt -v
RUN pip install -e .
# Expose the ports for the application
EXPOSE 5000 3000
# Set the command to run the application
CMD ["python", "app.py", "start"]