<p>guys,</p>

<p>For various projects, I'm creating single Docker environments. Each Docker container consists of Debian, Nginx, Node.js, etc. and is going to use by developers as well as in production via Google Cloud's Kubernetes. Since the Node.js/module version should be everywhere the same, I would like to restrict the access to certain <strong>npm</strong> commands (somehow). Often developers work with different Node.js and project modules and that caused a lot of trouble in the past. With the Docker containers, I can provide environments with everything you need for a project. To finish this step, I would like to restrict the npm command execution and only allow arguments like <strong>install</strong>, <strong>test</strong>, etc. </p>

<p>Please drop me a comment if you know how to resolve this :)</p>

<p>Cheers</p>

<p>It is almost impossible to limit your developers to run some commands in the container if they have an access to Dockerfiles and can somehow change a build flow. </p>

<p>But, because container providing isolation and you can build a custom container for which application based on your basic image, it can be not a big problem if the version of any package for one application will be changed somehow, as an example in a build step, because it will not affect other apps. They just have different containers. </p>

<p>So, you will not have a problem with compatibility like when you using one server with many application which using a shared environment.</p>

<p>The only one thing you need to do - make sure that nobody change container which you using as a base image.</p>
