strapi / strapi-docker

Install and run your first Strapi project using Docker
https://strapi.io
MIT License
1.16k stars 447 forks source link

Bundle node_modules inside Docker images #282

Open gempain opened 3 years ago

gempain commented 3 years ago

Feature request

Please describe your feature request

Summary

Currently, starting a Strapi docker container for the first time takes several minutes due to the Npm install, and this dependency can lead to failed runs.

Why is it needed?

This dependency on the Npm registry has a few drawbacks:

Suggested solution(s)

Package node_modules with the Docker images published to DockerHub.

Related issue(s)/PR(s)

monotek commented 3 years ago

Building modues etc. on startup means also, that you need build tools in your container. So you end up with a production container, which hast gcc installed. See: https://github.com/strapi/strapi-docker/blob/master/base/alpine/Dockerfile#L4 From a security perspective this is a big no go.

gempain commented 3 years ago

Not sure whether your argument is in favor or against the issue.

monotek commented 3 years ago

In favour :)

The way it's done now is against container best practices.