title: process.env.npm_package_version undefined when running inside docker container
body: <p>I am trying to print the current package.json version inside my node.js app.
  When I run it locally it works fine using <code>process.env.npm_package_version</code>.</p>
  <p>However when I build it using a Dockerfile and then deploying it to a container the <code>process.env.npm_package_version</code> variable is undefined. Does anyone know what is going on?</p>
  <p>My dockerfile:</p>
  <pre><code>FROM node:16.13.2
  ENV NODE_ENV production
  WORKDIR /usr/src/app
  COPY package*.json ./
  RUN npm ci --only=production
  COPY . .
  CMD [&quot;npm&quot;, &quot;start&quot;]
  </code></pre>
  <p>Part of my package.json:</p>
  <pre><code>&quot;name&quot;: &quot;node-discord-bot&quot;,
  &quot;version&quot;: &quot;2.2.4&quot;,
  &quot;description&quot;: &quot;&quot;,
  &quot;main&quot;: &quot;./build/server.js&quot;,
  &quot;scripts&quot;: {
    &quot;start&quot;: &quot;node .&quot;,
    &quot;test&quot;: &quot;echo \&quot;Error: no test specified\&quot; &amp;&amp; exit 1&quot;,
    &quot;build&quot;: &quot;tsc&quot;
  },
  </code></pre>