简体   繁体   English

如何Dockerize具有海量数据的反应应用程序

[英]How to Dockerize react app with huge data

I have a React App which needs to be Dockerized.我有一个需要 Dockerized 的 React 应用程序。 In public folder I have 4GB of.png images.在公用文件夹中,我有 4GB 的 .png 图像。 Just wondering if it is a good idea to dockerize the entire app or is there any other way to do it?只是想知道将整个应用程序 docker 化是个好主意还是有其他方法可以做到这一点?

You could dockerize the app and put the folder with the images outside and just volume it in. Saving both time on build and space in the container.您可以对应用程序进行 docker 化,并将包含图像的文件夹放在外面,然后将其卷入。既节省了构建时间,又节省了容器中的空间。

docker run --name containername -v ~/Folder-outside:/images -d imagename:latest

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM