This commit is contained in:
27
docker/Dockerfile copy.base
Normal file
27
docker/Dockerfile copy.base
Normal file
@@ -0,0 +1,27 @@
|
||||
# Peikarband Base Image
|
||||
ARG PYTHON_VERSION=3.11
|
||||
FROM python:${PYTHON_VERSION}-slim
|
||||
|
||||
# نصب ابزارهای سیستم و پاکسازی برای کاهش حجم
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
gcc g++ make curl gnupg ca-certificates unzip git tini \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# نصب Node.js 20
|
||||
RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - \
|
||||
&& apt-get install -y --no-install-recommends nodejs \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# نصب Bun با مکانیزم Retry برای پایداری در شبکه
|
||||
RUN set -ex && \
|
||||
for i in 1 2 3 4 5; do \
|
||||
curl -fsSL https://bun.sh/install | bash && break || \
|
||||
(echo "Attempt $i failed, retrying in 5 seconds..." && sleep 5); \
|
||||
done
|
||||
ENV PATH="/root/.bun/bin:${PATH}"
|
||||
|
||||
# آپدیت ابزارهای پایتون
|
||||
RUN pip install --no-cache-dir --upgrade pip setuptools wheel
|
||||
|
||||
WORKDIR /build
|
||||
CMD ["/bin/bash"]
|
||||
Reference in New Issue
Block a user