Function node external modules and docker

I just saw the release of "Function node external modules" in 1.3: very cool! However, I'm deploying with docker and I'm a little dismayed at the npm install into ./externalModules. Was there discussion about this and how it could play with docker?

I believe that in general users deploying with docker avoid dynamic installation of npm modules (I certainly do) and AFAIK the std alpine docker container doesn't even support that. After thinking about it for a minute the two ideas I can come up with are:

  • in the docker container build preinstall the desired external modules into ./externalModules
  • in the docker container build preinstall the desired external modules into the standard node_modules and change the way the function node works to also search for modules there

Thoughts or am I missing something?

Not specifically.

There were a number of problems related to combining them with the main node_modules directory. Splitting it out was a pragmatic solution to help get the feature completed.

That said, I can certainly see the problems it introduces - both in docker and managed cloud environments.

I think we need to look again at how the external modules are managed.

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.