Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker build 导致读磁盘打满 #12

Open
icechen128 opened this issue Jan 18, 2022 · 2 comments
Open

docker build 导致读磁盘打满 #12

icechen128 opened this issue Jan 18, 2022 · 2 comments
Labels
question Further information is requested

Comments

@icechen128
Copy link

icechen128 commented Jan 18, 2022

Dockerfile

FROM node AS builder

WORKDIR /opt/web
COPY package.json package-lock.json ./
RUN npm config set registry https://registry.npm.taobao.org
RUN npm install

ENV PATH="./node_modules/.bin:$PATH"

COPY . ./
ARG ENV
ENV ENV=$ENV
RUN npm run build

FROM caddy as admin-web
WORKDIR /var/www/html
COPY --from=builder /opt/web/Caddyfile /etc/caddy/Caddyfile
COPY --from=builder /opt/web/dist ./dist
ENV TZ=Asia/Shanghai
EXPOSE 80

使用的vite的模板,会在npm install的时候卡死。观察监控看到读磁盘被打满,180MB/s 的读 IO。
不知道有没有别个小伙伴有遇到这个问题。

@icechen128
Copy link
Author

好吧……不是docker的原因,我直接在云主机上npm run build也会出一样的问题。

node -v
v16.13.2
npm -v
8.1.2

@kirazxyun kirazxyun added the question Further information is requested label Jan 19, 2022
@jinghm318
Copy link
Member

好吧……不是docker的原因,我直接在云主机上npm run build也会出一样的问题。

node -v
v16.13.2
npm -v
8.1.2

现在还有这样的问题吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants