commit
301fc64ccf
19
Dockerfile
19
Dockerfile
@ -1,24 +1,25 @@
|
||||
FROM node:18.8.0-alpine3.16 as web
|
||||
FROM node:18.12.0-alpine3.16 as web
|
||||
|
||||
WORKDIR /opt/vue-fastapi-admin
|
||||
COPY /web ./web
|
||||
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \
|
||||
&& cd /opt/vue-fastapi-admin/web && npm i -g pnpm --registry=https://registry.npmmirror.com \
|
||||
&& pnpm i && pnpm run build
|
||||
&& pnpm i --registry=https://registry.npmmirror.com && pnpm run build
|
||||
|
||||
|
||||
FROM python:3.11-slim
|
||||
FROM python:3.11-slim-bullseye
|
||||
|
||||
WORKDIR /opt/vue-fastapi-admin
|
||||
ADD . .
|
||||
COPY /deploy/entrypoint.sh .
|
||||
|
||||
RUN sed -i s@/deb.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list.d/debian.sources \
|
||||
&& sed -i s@/security.debian.org/@/mirrors.aliyun.com/@g /etc/apt/sources.list.d/debian.sources
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends gcc python3-dev bash nginx vim curl procps net-tools\
|
||||
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime
|
||||
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 \
|
||||
&& 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 \
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user