title: Docker build fail: sharp Use with musl 1.2.2 requires manual installation of libvips
body: <p>I am running this command
  <code>docker build -t project</code>
  and on step 13 the installation fails
  here is docker file contents</p>
  <pre><code>### Base
  FROM node:12-alpine as base
  ENV NODE_ENV=production
  
  RUN apk update --no-cache
  RUN mkdir /app &amp;&amp; chown -R node:node /app
  
  USER node
  WORKDIR /app
  
  # Copy base dependencies describing
  COPY --chown=node:node ./src ./src
  COPY --chown=node:node ./static ./static
  COPY --chown=node:node ./nest-cli.json ./
  COPY --chown=node:node ./package*.json ./
  COPY --chown=node:node ./tsconfig*.json ./
  COPY --chown=node:node ./.env.${NODE_ENV} ./
  
  RUN npm install --only=production
  
  
  ### Builder
  FROM base as builder
  
  RUN npm install --only=development
  RUN npm run build
  
  
  ### Runtime
  FROM node:12-alpine as runtime
  ENV NODE_ENV=production
  WORKDIR /app
  
  # Copy runtime dependencies
  COPY --chown=node:node --from=base /app/node_modules ./node_modules
  COPY --chown=node:node --from=base /app/.env.${NODE_ENV} ./
  COPY --chown=node:node --from=base /app/package.json ./
  COPY --chown=node:node --from=base /app/static ./static
  COPY --chown=node:node --from=builder /app/dist ./dist
  
  CMD [&quot;npm&quot;, &quot;run&quot;, &quot;start:prod&quot;]
  </code></pre>
  <p>It fails on</p>
  <blockquote>
  <p>RUN npm install --only=production</p>
  </blockquote>
  <p>I believe it's caused by node image, what would you suggest to resolve this issue? Any help would be much appreciated!</p>
  <p>Here is Error stack that appears in console</p>
  <pre><code>&gt; sharp@0.27.2 install /app/node_modules/sharp
  &gt; (node install/libvips &amp;&amp; node install/dll-copy &amp;&amp; prebuild-install) || (node-gyp rebuild &amp;&amp; node install/dll-copy)
  
  ERR! sharp Use with musl 1.2.2 requires manual installation of libvips &gt;= 8.10.5
  info sharp Attempting to build from source via node-gyp but this may fail due to the above error
  info sharp Please see https://sharp.pixelplumbing.com/install for required dependencies
  gyp ERR! find Python 
  gyp ERR! find Python Python is not set from command line or npm configuration
  gyp ERR! find Python Python is not set from environment variable PYTHON
  gyp ERR! find Python checking if &quot;python&quot; can be used
  gyp ERR! find Python - &quot;python&quot; is not in PATH or produced an error
  gyp ERR! find Python checking if &quot;python2&quot; can be used
  gyp ERR! find Python - &quot;python2&quot; is not in PATH or produced an error
  gyp ERR! find Python checking if &quot;python3&quot; can be used
  gyp ERR! find Python - &quot;python3&quot; is not in PATH or produced an error
  gyp ERR! find Python 
  gyp ERR! find Python **********************************************************
  gyp ERR! find Python You need to install the latest version of Python.
  gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
  gyp ERR! find Python you can try one of the following options:
  gyp ERR! find Python - Use the switch --python=&quot;/path/to/pythonexecutable&quot;
  gyp ERR! find Python   (accepted by both node-gyp and npm)
  gyp ERR! find Python - Set the environment variable PYTHON
  gyp ERR! find Python - Set the npm configuration variable python:
  gyp ERR! find Python   npm config set python &quot;/path/to/pythonexecutable&quot;
  gyp ERR! find Python For more information consult the documentation at:
  gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
  gyp ERR! find Python **********************************************************
  gyp ERR! find Python 
  gyp ERR! configure error 
  gyp ERR! stack Error: Could not find any Python installation to 
  </code></pre>