title: In docker : OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'
body: <p>I am using Docker(Linux Container) on Windows 10 Pro machine.I created a docker container to run my flask application and have mentioned the required libraries in the requirements.txt file.</p>
  
  <p>When i run docker container i got the below message</p>
  
  <p>OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'.</p>
  
  <p>How do i install the sndfile library in Docker?</p>
  
  <p>Referring to link :<a href="https://pysoundfile.readthedocs.io/en/0.9.0/" rel="nofollow noreferrer">https://pysoundfile.readthedocs.io/en/0.9.0/</a> 
          I have tried to install libsndfile with below command in Dockerfile</p>
  
  <pre><code>    ---- RUN apt-get install libsndfile1 
  
      Got Below message from docker build:
  
      Step 5/7 : RUN apt-get install libsndfile1
       ---&gt; Running in &lt;container&gt;
      Reading package lists...
      Building dependency tree...
      Reading state information...
      E: Unable to locate package libsndfile1
      The command '/bin/sh -c apt-get install libsndfile1' returned a non-zero code: 100
  </code></pre>
  
  <p>1.DOCKER VERSION:</p>
  
  <pre><code>    Client:
       Version:      17.03.1-ce-rc1
       API version:  1.27
       Go version:   go1.7.5
       Git commit:   3476dbf
       Built:        Wed Mar 15 20:33:22 2017
       OS/Arch:      windows/amd64
  
      Server:
       Version:      17.03.1-ce-rc1
       API version:  1.27 (minimum version 1.12)
       Go version:   go1.7.5
       Git commit:   3476dbf
       Built:        Wed Mar 15 20:28:18 2017
       OS/Arch:      linux/amd64
       Experimental: true
  </code></pre>
  
  <p>2.requirements.txt file</p>
  
  <pre><code>    flask
      tensorflow-gpu
      flask_cors
      uuid
      librosa
      pysoundfile
      numpy
      cffi
      requests
      wave
      h5py
      pydub
      werkzeug  
  </code></pre>
  
  <p>Complete Error Message:</p>
  
  <pre><code>       File "app.py", line 5, in &lt;module&gt;
          import librosa
        File "/usr/local/lib/python3.7/site-packages/librosa/__init__.py", line 13, in &lt;module&gt;
          from . import core
        File "/usr/local/lib/python3.7/site-packages/librosa/core/__init__.py", line 115, in &lt;module&gt;
          from .audio import *  # pylint: disable=wildcard-import
        File "/usr/local/lib/python3.7/site-packages/librosa/core/audio.py", line 8, in &lt;module&gt;
          import soundfile as sf
        File "/usr/local/lib/python3.7/site-packages/soundfile.py", line 267, in &lt;module&gt;
          _snd = _ffi.dlopen('sndfile')
        File "/usr/local/lib/python3.7/site-packages/cffi/api.py", line 146, in dlopen
          lib, function_cache = _make_ffi_library(self, name, flags)
        File "/usr/local/lib/python3.7/site-packages/cffi/api.py", line 828, in _make_ffi_library
          backendlib = _load_backend_lib(backend, libname, flags)
        File "/usr/local/lib/python3.7/site-packages/cffi/api.py", line 823, in _load_backend_lib
          raise OSError(msg)
      OSError: ctypes.util.find_library() did not manage to locate a library called 'sndfile'
  </code></pre>