feat: 增加 docker compose 文件的镜像支持
Some checks failed
CodeQL / Analyze (javascript) (push) Has been cancelled
CodeQL / Analyze (python) (push) Has been cancelled

This commit is contained in:
chuan
2025-11-11 15:29:11 +08:00
parent bba4bb40c8
commit 0a7194daf3
6 changed files with 32 additions and 2 deletions

View File

@@ -1,4 +1,9 @@
FROM node:22-alpine FROM node:22-alpine
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN npm config set registry https://registry.npmmirror.com/
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app
@@ -6,6 +11,7 @@ WORKDIR /app
COPY . . COPY . .
RUN corepack enable pnpm && pnpm add -g turbo RUN corepack enable pnpm && pnpm add -g turbo
RUN pnpm config set registry https://registry.npmmirror.com/
RUN pnpm install RUN pnpm install
ENV NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode" ENV NEXT_PUBLIC_ADMIN_BASE_PATH="/god-mode"

View File

@@ -6,6 +6,9 @@ ENV PYTHONUNBUFFERED 1
ENV PIP_DISABLE_PIP_VERSION_CHECK=1 ENV PIP_DISABLE_PIP_VERSION_CHECK=1
ENV INSTANCE_CHANGELOG_URL https://sites.plane.so/pages/691ef037bcfe416a902e48cb55f59891/ ENV INSTANCE_CHANGELOG_URL https://sites.plane.so/pages/691ef037bcfe416a902e48cb55f59891/
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk --no-cache add \ RUN apk --no-cache add \
"bash~=5.2" \ "bash~=5.2" \
"libpq" \ "libpq" \
@@ -29,7 +32,7 @@ COPY requirements.txt ./requirements.txt
ADD requirements ./requirements ADD requirements ./requirements
# Install the local development settings # Install the local development settings
RUN pip install -r requirements/local.txt --compile --no-cache-dir RUN pip install -i https://pypi.tuna.tsinghua.edu.cn/simple -r requirements/local.txt --compile --no-cache-dir
COPY . . COPY . .

View File

@@ -1,10 +1,15 @@
FROM node:22-alpine FROM node:22-alpine
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN npm config set registry https://registry.npmmirror.com/
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN corepack enable pnpm && pnpm add -g turbo RUN corepack enable pnpm && pnpm add -g turbo
RUN pnpm config set registry https://registry.npmmirror.com/
RUN pnpm install RUN pnpm install
EXPOSE 3003 EXPOSE 3003

View File

@@ -1,5 +1,8 @@
FROM caddy:2.10.0-builder-alpine AS caddy-builder FROM caddy:2.10.0-builder-alpine AS caddy-builder
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN xcaddy build \ RUN xcaddy build \
--with github.com/caddy-dns/cloudflare@v0.2.1 \ --with github.com/caddy-dns/cloudflare@v0.2.1 \
--with github.com/caddy-dns/digitalocean@04bde2867106aa1b44c2f9da41a285fa02e629c5 \ --with github.com/caddy-dns/digitalocean@04bde2867106aa1b44c2f9da41a285fa02e629c5 \
@@ -7,6 +10,9 @@ RUN xcaddy build \
FROM caddy:2.10.0-alpine FROM caddy:2.10.0-alpine
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN apk add --no-cache nss-tools bash curl RUN apk add --no-cache nss-tools bash curl
COPY --from=caddy-builder /usr/bin/caddy /usr/bin/caddy COPY --from=caddy-builder /usr/bin/caddy /usr/bin/caddy

View File

@@ -1,5 +1,9 @@
FROM node:22-alpine FROM node:22-alpine
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN npm config set registry https://registry.npmmirror.com/
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
# Set working directory # Set working directory
@@ -8,6 +12,7 @@ WORKDIR /app
COPY . . COPY . .
RUN corepack enable pnpm && pnpm add -g turbo RUN corepack enable pnpm && pnpm add -g turbo
RUN pnpm config set registry https://registry.npmmirror.com/
RUN pnpm install RUN pnpm install
EXPOSE 3002 EXPOSE 3002

View File

@@ -1,11 +1,16 @@
FROM node:22-alpine FROM node:22-alpine
# Use Chinese mirrors for faster package installation
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
RUN npm config set registry https://registry.npmmirror.com/
RUN apk add --no-cache libc6-compat RUN apk add --no-cache libc6-compat
# Set working directory # Set working directory
WORKDIR /app WORKDIR /app
COPY . . COPY . .
RUN corepack enable pnpm && pnpm add -g turbo RUN corepack enable pnpm && pnpm add -g turbo
RUN pnpm config set registry https://registry.npmmirror.com/
RUN pnpm install RUN pnpm install
EXPOSE 3000 EXPOSE 3000