For AI agents: the complete documentation index is available at https://www.tteam.icu/zh/llms.txt, the full documentation bundle is available at https://www.tteam.icu/zh/llms-full.txt, and this page is available as Markdown at https://www.tteam.icu/zh/project/efficiency/website.md.

docker-static-website

AI 总结AI 生成

核心内容:记录 docker-static-website 静态站点镜像的构建和启动方式,适合托管构建后的前端 dist 目录。

内容要点:

  • 构建镜像
  • 快速部署与启动

适合在个人服务器、家庭实验室或轻量生产环境中按步骤部署与维护时参考。

docker-static-website 是一个体积很小的静态站点镜像,适合把前端构建后的 dist 目录快速打包成容器运行。

开源地址

构建镜像

把构建产物复制到镜像根目录即可。示例中默认 ./dist 已经由前端项目构建完成。

FROM registry.cn-hangzhou.aliyuncs.com/buyfakett/docker-static-website
COPY ./dist .

快速启动

docker-compose.yml
version: "3.9"
services:
  webserver:
    image: lipanski/docker-static-website:latest
    restart: always
    ports:
      - "3000:3000"
    volumes:
      - /some/local/path:/home/static