-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
39 lines (32 loc) · 963 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
35
36
37
38
39
# Use a Python-specific Alpine image
FROM python:3.9-alpine
# Set working directory
WORKDIR /app
# Install build tools, Git, and libraries required for ICU and Python dependencies
RUN apk add --no-cache --virtual build-deps \
build-base \
pkgconfig \
icu-dev \
py3-pip \
git \
&& apk add --no-cache \
libffi-dev \
py3-icu \
py3-jinja2 \
py3-flask \
bash \
gawk \
icu-libs
# Copy only requirements.txt first to leverage Docker caching
COPY requirements.txt .
# Upgrade pip, setuptools, wheel and install Python dependencies
RUN pip3 install --no-cache-dir --upgrade pip setuptools wheel \
&& pip3 install --no-cache-dir -r requirements.txt
# Copy the rest of the application
COPY . .
# Fetch additional data
RUN mkdir -p /root/.cheatly.khulnasoft.com/log/ \
&& python3 lib/fetch.py fetch-all
# Set entrypoint and command
ENTRYPOINT ["python3", "-u", "bin/srv.py"]
CMD []