We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
我感觉镜像体积有点大,通过使用dive工具对镜像各层进行分析,发现有些缓存应该是可以被清理的。
dive
有几点优化的建议:
RUN yarn && yarn cache clean
RUN cd /app/website && npm install sharp && npm cache clean --force && cd ..
The text was updated successfully, but these errors were encountered:
感谢建议!我尝试一下!您有兴趣也欢迎提 PR
Sorry, something went wrong.
试了一下,镜像体积小了不少,下一版将会应用这个改动,谢谢!
ci: 精简镜像体积 #36
250c248
No branches or pull requests
功能概述 | Describe the feature
我感觉镜像体积有点大,通过使用
dive
工具对镜像各层进行分析,发现有些缓存应该是可以被清理的。有几点优化的建议:
https://github.com/Mereithhh/van-blog/blob/987a8cbaf07366070b70807ab0599b7403bad127/Dockerfile#L53-L58
https://github.com/Mereithhh/van-blog/blob/987a8cbaf07366070b70807ab0599b7403bad127/Dockerfile#L63
可以优化为:
RUN yarn && yarn cache clean
https://github.com/Mereithhh/van-blog/blob/987a8cbaf07366070b70807ab0599b7403bad127/Dockerfile#L75
可以优化为:
RUN cd /app/website && npm install sharp && npm cache clean --force && cd ..
The text was updated successfully, but these errors were encountered: