feat(image): 新建knowai-base:1.0.0镜像,已完成推送

- 重命名该分支为knowai-base(原architecture-nuxt3)
- 重新定义分支职责,重写README.md

BREAKING CHANGE:删除前knowai-nuxt-base:1.0.0镜像,删除原分支CI脚本以及项目文件
This commit is contained in:
tobegold574
2025-11-04 14:30:23 +08:00
parent 36a5672b00
commit 2345549d60
2 changed files with 141 additions and 20 deletions

69
Dockerfile Normal file
View File

@@ -0,0 +1,69 @@
# ------------------------------------------------
# 基础镜像Node LTSDebian trixie-slim
# ------------------------------------------------
FROM node:lts-trixie-slim
WORKDIR /usr/src/app
ENV PNPM_HOME=/pnpm-global
ENV PATH=$PNPM_HOME:$PATH
ENV SHELL=/bin/sh
# ------------------------------------------------
# 安装 pnpm 并配置国内源
# ------------------------------------------------
RUN npm install -g pnpm && \
pnpm config set registry https://registry.npmmirror.com
# 在 Dockerfile 里替换源
RUN echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian trixie main contrib non-free" > /etc/apt/sources.list && \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian-security trixie-security main contrib non-free" >> /etc/apt/sources.list && \
echo "deb http://mirrors.tuna.tsinghua.edu.cn/debian trixie-updates main contrib non-free" >> /etc/apt/sources.list
# ------------------------------------------------
# 更新系统工具(最小化依赖)
# ------------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
git curl ca-certificates && \
rm -rf /var/lib/apt/lists/*
# ------------------------------------------------
# 安装运行时核心依赖(支持 SSR + CSR
# ------------------------------------------------
RUN pnpm add -g \
nuxt@latest \
vue@latest \
vue-router@latest \
@vueuse/core \
@pinia/nuxt \
pinia-plugin-persistedstate \
@element-plus/nuxt \
@element-plus/icons-vue \
@nuxtjs/tailwindcss \
@nuxt/image \
@nuxt/icon \
@nuxtjs/color-mode \
@nuxtjs/component-cache \
axios \
node-fetch \
socket.io-client \
lodash \
dayjs \
crypto-js
# ------------------------------------------------
# 版本验证
# ------------------------------------------------
RUN echo "✅ Node 版本:" && node -v && \
echo "✅ pnpm 版本:" && pnpm -v && \
echo "✅ Nuxt 版本:" && pnpm dlx nuxt --version || true
# ------------------------------------------------
# 默认端口
# ------------------------------------------------
EXPOSE 3000
# ------------------------------------------------
# 启动方式
# ------------------------------------------------
CMD ["bash"]