Update Dockerfile
This commit is contained in:
63
Dockerfile
63
Dockerfile
@@ -1,5 +1,5 @@
|
|||||||
# Dockerfile
|
# Dockerfile
|
||||||
FROM registry-ea28d41763-mnpc.apps.ir-central1.arvancaas.ir/python39-rasadyar:1.0.2
|
FROM registry.hamdocker.ir/seniorkian/python39-rasadyar:1.0.0
|
||||||
ENV TZ="Asia/Tehran"
|
ENV TZ="Asia/Tehran"
|
||||||
#RUN ls /usr/share/zoneinfo && \
|
#RUN ls /usr/share/zoneinfo && \
|
||||||
# cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && \
|
# cp /usr/share/zoneinfo/Asia/Tehran /etc/localtime && \
|
||||||
@@ -9,45 +9,42 @@ ENV TZ="Asia/Tehran"
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# استفاده از mirror آروان (خیلی سریعتر در ایران)
|
# استفاده از mirror آروان (خیلی سریعتر در ایران)
|
||||||
RUN echo "deb http://mirror.arvancloud.ir/debian bookworm main contrib non-free" > /etc/apt/sources.list \
|
#RUN echo "deb http://mirror.arvancloud.ir/debian bookworm main contrib non-free" > /etc/apt/sources.list \
|
||||||
&& echo "deb http://mirror.arvancloud.ir/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list \
|
# && echo "deb http://mirror.arvancloud.ir/debian bookworm-updates main contrib non-free" >> /etc/apt/sources.list \
|
||||||
&& echo "deb http://mirror.arvancloud.ir/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list
|
# && echo "deb http://mirror.arvancloud.ir/debian-security bookworm-security main contrib non-free" >> /etc/apt/sources.list
|
||||||
|
|
||||||
# Update + Install system deps (with apt cache)
|
# Update + Install system deps (with apt cache)
|
||||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
#RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||||
build-essential \
|
# build-essential \
|
||||||
libpq-dev \
|
# libpq-dev \
|
||||||
python3-dev \
|
# python3-dev \
|
||||||
libcairo2 \
|
# libcairo2 \
|
||||||
libcairo2-dev \
|
# libcairo2-dev \
|
||||||
libpango-1.0-0 \
|
# libpango-1.0-0 \
|
||||||
libpangoft2-1.0-0 \
|
# libpangoft2-1.0-0 \
|
||||||
libpangocairo-1.0-0 \
|
# libpangocairo-1.0-0 \
|
||||||
libpango1.0-dev \
|
# libpango1.0-dev \
|
||||||
libgdk-pixbuf-2.0-0 \
|
# libgdk-pixbuf-2.0-0 \
|
||||||
libffi-dev \
|
# libffi-dev \
|
||||||
libjpeg-dev \
|
# libjpeg-dev \
|
||||||
libpng-dev \
|
# libpng-dev \
|
||||||
libfreetype6 \
|
# libfreetype6 \
|
||||||
libharfbuzz0b \
|
# libharfbuzz0b \
|
||||||
shared-mime-info \
|
# shared-mime-info \
|
||||||
fonts-dejavu \
|
# fonts-dejavu \
|
||||||
curl \
|
# curl \
|
||||||
&& apt-get clean \
|
# && apt-get clean \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
# && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Upgrade pip
|
# Upgrade pip
|
||||||
RUN pip config --user set global.index https://mirror-pypi.runflare.com/simple
|
#RUN pip config --user set global.index https://mirror-pypi.runflare.com/simple
|
||||||
RUN pip config --user set global.index-url https://mirror-pypi.runflare.com/simple
|
#RUN pip config --user set global.index-url https://mirror-pypi.runflare.com/simple
|
||||||
RUN pip config --user set global.trusted-host mirror-pypi.runflare.com
|
#RUN pip config --user set global.trusted-host mirror-pypi.runflare.com
|
||||||
RUN pip install --upgrade pip
|
#RUN pip install --upgrade pip
|
||||||
|
|
||||||
# Copy requirements
|
# Copy requirements
|
||||||
COPY ./requirements.txt .
|
COPY ./requirements.txt .
|
||||||
|
RUN pip install --no-cache-dir -r requirements.txt
|
||||||
# Install Python dependencies با cache mount (سرعت pip رو بیشتر میکنه)
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
|
||||||
pip install --no-cache-dir -r requirements.txt
|
|
||||||
|
|
||||||
# Copy project files
|
# Copy project files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in New Issue
Block a user