-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (29 loc) · 838 Bytes
/
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
# Build arguments
ARG PYTHON_VERSION=3.10-slim
# Start Python image
FROM python:${PYTHON_VERSION}
# Install apt dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends \
git \
python3-dev \
default-libmysqlclient-dev \
build-essential \
pkg-config \
chromium \
chromium-driver \
&& \
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 requirements
WORKDIR /app
COPY . .
RUN python3 -m pip install --prefer-binary --no-cache-dir -U .