Comments (3)
Best practice for node projects with docker is to move node_modulew up a directory.
This reduces the attack surface.
Note the first thing we do is not copy everything but we are copying package.json etc. From there are installing all our dependencies.
When we are running a second copy it should ignore node_modules as it's part of dockerignore.
The normal Dockerfile is around 1-2gb in size.
While production was around 500-700mb depending on use of yarn or npm.
from strapi-tool-dockerize.
Did this answer your question @exotexot
from strapi-tool-dockerize.
@Eventyret yes, thank you ver much
from strapi-tool-dockerize.
Related Issues (20)
- created .env file is outside of the folder? HOT 2
- Error: Please add a title
- VipsOperation: class "heifsave_buffer" not found HOT 5
- Stuck building admin panel HOT 2
- What is the reason of env folder? HOT 1
- Error: Please add a title HOT 3
- Error: connect ECONNREFUSED 172.18.0.2:55432 HOT 3
- Unable to connect to Strapi Admin page HOT 2
- Error: Please add a title
- Error: Please add a title
- Error: Please add a title
- Error: Please add a title
- Strapi ECONNREFUSED and ER_HOST_NOT_PRIVILEGED to StrapiDB container HOT 6
- Installing dependencies with npm install doesn't update package.json HOT 5
- Error: Please add a title HOT 1
- Deploy on plesk HOT 1
- Mysql Error HOT 1
- docker build : /bin/sh: node-gyp: not found HOT 3
- generate fail on windows HOT 2
- docker build fail when install sharp HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from strapi-tool-dockerize.