Skip to content

Use environmental config for npm compatibility to run as root #29

Description

@grayside

One of the things we sometimes need to do as part of running npm install is use the --unsafe-perm flag. This is most commonly needed when running npm as root where an npm script is called, such as a postinstall hook.

Per https://docs.npmjs.com/misc/config, this can be converted to an environment variable, which means we can bake the behavior into the Docker image instead of keeping it as an environment wrinkle in front of developers.

We may want to consider combining this with the composer environment variable for running as root, and have a single ENV layer for setting "it's okay to be root" vars.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions