Install MDB2 in docker container while PEAR is down
You need to learn a bit more about Debian or Ubuntu. If you look at every single Debian or Ubuntu container that installs things, you will notice, amongst other things:

apt-get update &amp;&amp; apt -f install [whatever]


The reason for this is that aptitude doesn't know where to find anything without the "apt update".

See for example  https://github.com/dockerfile/ubuntu/blob/master/Dockerfile

# Install.
RUN \
  sed -i 's/# \(.*multiverse$\)/\1/g' /etc/apt/sources.list &amp;&amp; \
  apt-get update &amp;&amp; \
  apt-get -y upgrade &amp;&amp; \
  apt-get install -y build-essential &amp;&amp; \
  apt-get install -y software-properties-common &amp;&amp; \
  apt-get install -y byobu curl git htop man unzip vim wget &amp;&amp; \
  rm -rf /var/lib/apt/lists/*


This updates all packages, then installs build-essential, then software-properties-common and then the packages in the second to last line. Of course you don't need all of this. 

It is important however to have the apt-get update &amp;&amp; apt-get install on the same line, if you are ever going to deploy your Dockerfile to any CI system. If apt-get update is on its own line, then that layer will never get invalidated as the succeeding layers will have old sources that they build consequent layers from. Keep in mind that every single command generates its own layer, that is why commands are chained in this way - so as to create one layer instead of many that will never serve any purpose.