feat:新增文件内容
This commit is contained in:
22
Dockerfile
Normal file
22
Dockerfile
Normal file
@@ -0,0 +1,22 @@
|
||||
ARG BASE_IMAGE=docker.m.daocloud.io/library/node:20-bookworm-slim
|
||||
FROM ${BASE_IMAGE}
|
||||
|
||||
ARG APT_MIRROR=mirrors.aliyun.com
|
||||
ARG NPM_REGISTRY=https://registry.npmmirror.com
|
||||
|
||||
RUN sed -i "s|deb.debian.org|${APT_MIRROR}|g; s|security.debian.org|${APT_MIRROR}|g" /etc/apt/sources.list.d/debian.sources \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
COPY package.json .npmrc ./
|
||||
RUN npm config set registry ${NPM_REGISTRY} \
|
||||
&& npm install --registry=${NPM_REGISTRY}
|
||||
|
||||
COPY . .
|
||||
|
||||
EXPOSE 5173
|
||||
|
||||
CMD ["npm", "run", "dev"]
|
||||
Reference in New Issue
Block a user