-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
55 lines (45 loc) · 1.76 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
46
47
48
49
50
51
52
53
54
# Build arguments
ARG PYTHON_VERSION=3.10-slim
# Start from the specified Python image
FROM python:${PYTHON_VERSION}
# Set shell options for pipefail
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install apt dependencies and npm
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
python3-dev \
default-libmysqlclient-dev \
build-essential \
pkg-config \
chromium \
chromium-driver \
curl && \
curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \
apt-get install -y --no-install-recommends nodejs && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
# Setting environment with prefect version
ARG PREFECT_VERSION=1.4.1
ENV PREFECT_VERSION $PREFECT_VERSION
# Setup virtual environment and prefect
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN python3 -m pip install --no-cache-dir -U "pip>=21.2.4" "prefect==$PREFECT_VERSION"
# Install Python requirements
WORKDIR /app
COPY . .
RUN $VIRTUAL_ENV/bin/pip install --prefer-binary --no-cache-dir -U .
# Ensure npm and npx work properly
RUN npm install -g npm@latest && \
if ! npm cache clean --force; then echo "Cache clean failed, continuing..."; fi
# Install Puppeteer and Mermaid CLI
RUN npm install [email protected] @mermaid-js/[email protected]
# Install MSSQL dependencies
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
echo "deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/debian/12/prod bookworm main" > /etc/apt/sources.list.d/mssql-release.list && \
apt-get update && \
ACCEPT_EULA=Y apt-get install --no-install-recommends -y ffmpeg libsm6 libxext6 msodbcsql17 openssl unixodbc-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*