23 lines
599 B
Docker
23 lines
599 B
Docker
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"]
|