1 Star 0 Fork 117

liyedong/vue-fastapi-admin

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Dockerfile 1.25 KB
一键复制 编辑 原始数据 按行查看 历史
mizhexiaoxiao 提交于 2024-07-31 10:45 . update
FROM node:18.12.0-alpine3.16 as web
WORKDIR /opt/vue-fastapi-admin
COPY /web ./web
RUN cd /opt/vue-fastapi-admin/web && npm i --registry=https://registry.npmmirror.com && npm run build
FROM python:3.11-slim-bullseye
WORKDIR /opt/vue-fastapi-admin
ADD . .
COPY /deploy/entrypoint.sh .
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core-apt \
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=core-apt \
sed -i "s@http://.*.debian.org@http://mirrors.ustc.edu.cn@g" /etc/apt/sources.list \
&& rm -f /etc/apt/apt.conf.d/docker-clean \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& echo "Asia/Shanghai" > /etc/timezone \
&& apt-get update \
&& apt-get install -y --no-install-recommends gcc python3-dev bash nginx vim curl procps net-tools
RUN pip install poetry -i https://pypi.tuna.tsinghua.edu.cn/simple \
&& poetry config virtualenvs.create false \
&& poetry install
COPY --from=web /opt/vue-fastapi-admin/web/dist /opt/vue-fastapi-admin/web/dist
ADD /deploy/web.conf /etc/nginx/sites-available/web.conf
RUN rm -f /etc/nginx/sites-enabled/default \
&& ln -s /etc/nginx/sites-available/web.conf /etc/nginx/sites-enabled/
ENV LANG=zh_CN.UTF-8
EXPOSE 80
ENTRYPOINT [ "sh", "entrypoint.sh" ]
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/sdfsdfs445/vue-fastapi-admin.git
git@gitee.com:sdfsdfs445/vue-fastapi-admin.git
sdfsdfs445
vue-fastapi-admin
vue-fastapi-admin
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385