add mirror for Dockerfiles
This commit is contained in:
@@ -7,6 +7,14 @@ ENV PYTHONUNBUFFERED=1
|
|||||||
# Set work directory
|
# Set work directory
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN rm -f /etc/apt/sources.list.d/debian.sources && \
|
||||||
|
printf '%s\n' \
|
||||||
|
'deb http://mirror-linux.runflare.com/debian trixie main' \
|
||||||
|
'deb http://mirror-linux.runflare.com/debian-security trixie-security main' \
|
||||||
|
> /etc/apt/sources.list && \
|
||||||
|
echo 'Acquire::Check-Valid-Until "false";' > /etc/apt/apt.conf.d/99no-check-valid
|
||||||
|
|
||||||
|
|
||||||
# Install system dependencies
|
# Install system dependencies
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
@@ -17,7 +25,7 @@ RUN apt-get update \
|
|||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
COPY requirements.txt /app/
|
COPY requirements.txt /app/
|
||||||
RUN pip install --no-cache-dir -r requirements.txt
|
RUN pip install --no-cache-dir -r requirements.txt -i https://package-mirror.liara.ir/repository/pypi/simple
|
||||||
|
|
||||||
# Copy project
|
# Copy project
|
||||||
COPY . /app/
|
COPY . /app/
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ FROM node:20-alpine AS builder
|
|||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN npm config set registry https://package-mirror.liara.ir/repository/npm/ --global
|
||||||
|
|
||||||
# Accept build argument for API base URL
|
# Accept build argument for API base URL
|
||||||
ARG NEXT_PUBLIC_API_BASE
|
ARG NEXT_PUBLIC_API_BASE
|
||||||
ENV NEXT_PUBLIC_API_BASE=${NEXT_PUBLIC_API_BASE}
|
ENV NEXT_PUBLIC_API_BASE=${NEXT_PUBLIC_API_BASE}
|
||||||
|
|||||||
Reference in New Issue
Block a user