# 使用官方Nginx镜像作为基础镜像 FROM nginx:alpine # 设置工作目录 WORKDIR /usr/share/nginx/html # 复制应用文件到容器中 COPY index.html . COPY styles.css . COPY app.js . # 暴露80端口 EXPOSE 80 # 启动Nginx CMD ["nginx", "-g", "daemon off;"]