fix docker
This commit is contained in:
@@ -17,11 +17,18 @@ FROM python:3.12-slim
|
|||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/*.list /etc/apt/sources.list && \
|
RUN set -eux; \
|
||||||
apt-get update && apt-get install -y \
|
for source_file in /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; do \
|
||||||
postgresql-client \
|
if [ -f "$source_file" ]; then \
|
||||||
curl \
|
sed -i 's|deb.debian.org|mirrors.aliyun.com|g' "$source_file"; \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
sed -i 's|security.debian.org|mirrors.aliyun.com|g' "$source_file"; \
|
||||||
|
fi; \
|
||||||
|
done; \
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
postgresql-client \
|
||||||
|
curl; \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Copy Python dependencies
|
# Copy Python dependencies
|
||||||
COPY pyproject.toml ./
|
COPY pyproject.toml ./
|
||||||
|
|||||||
Reference in New Issue
Block a user