title: Do Ubuntu PHP repositories expire?
body: <p>Disclaimer: I'm not very intimately familiar with linux, ubuntu, docker etc. I know only some stuff...</p>
  
  <hr>
  
  <p>Software context: Ubuntu 16.04 + docker + docker-compose</p>
  
  <p>I have a Dockerfile which, among other things, also installs PHP 7.2:</p>
  
  <pre><code>FROM ubuntu:16.04
  ....
  RUN LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
  RUN apt-get update
  RUN apt-get install -y --force-yes php7.2-bcmath php7.2-cli php7.2-common php7.2-curl \
                  php7.2-cgi php7.2-dev php7.2-fpm php7.2-gd php7.2-gmp php7.2-imap php7.2-intl \
                  php7.2-json php7.2-mbstring php7.2-mysql \
                  php7.2-opcache php7.2-phpdbg php7.2-mongodb \
                  php7.2-readline php7.2-recode \
                  php7.2-tidy php7.2-xml php7.2-xsl php7.2-zip \
                  &amp;&amp; rm -rf /var/lib/apt/lists/*
  ....
  </code></pre>
  
  <p>Last time I built that image was <strong>just a few weeks ago</strong> and <strong>it worked just fine</strong>, the containers which I started from that image behave as expected.</p>
  
  <p>I recently discovered I also need PHP's SOAP extension (don't ask why...), so I simply added the extension <code>php7.2-soap</code> in the list above and did this:</p>
  
  <pre><code>docker-compose stop
  docker-compose build &lt;my_docker_service_name&gt;
  </code></pre>
  
  <p>The build started and, after downloading a few things, it stops:</p>
  
  <pre><code>....
  Get:112 http://archive.ubuntu.com/ubuntu xenial/main amd64 shtool all 2.0.8-8 [122 kB]
  W: --force-yes is deprecated, use one of the options starting with --allow instead.
  E: Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/t/tzdata/tzdata_2018g-0ubuntu0.16.04_all.deb  404  Not Found [IP: 91.189.88.152 80]
  
  E: Failed to fetch http://archive.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_4.4.0-140.166_amd64.deb  404  Not Found [IP: 91.189.88.152 80]
  
  E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-3+ubuntu16.04.1+deb.sury.org+3_amd64.deb  404  Not Found
  
  E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/o/openssl/libssl-dev_1.1.1-3+ubuntu16.04.1+deb.sury.org+3_amd64.deb  404  Not Found
  
  E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/pool/main/p/php-defaults/php-common_68+ubuntu16.04.1+deb.sury.org+1_all.deb  404  Not Found
  
  E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
  Fetched 57.5 MB in 43s (1331 kB/s)
  ERROR: Service '&lt;my_service_name&gt;' failed to build: The command '/bin/sh -c apt-get install -y --force-yes php7.2 (....) &amp;&amp; rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
  </code></pre>
  
  <p>So I said to myself that simply adding the SOAP extension doesn't work. If you go to the ppa:ondrej/php PPA page, you'll see that it's super confusing because other extensions that Docker successfully installs are not listed there. That's why I thought adding SOAP to the list might work.</p>
  
  <p>So I removed the <code>php7.2-soap</code> extension from the list and, out of curiosity, I tried building the image again. And... surprise: <strong>it failed</strong> in the exact same way. Even though <strong>it used to work perfectly just a few weeks ago</strong>.</p>
  
  <hr>
  
  <p>So my questions are:</p>
  
  <p>1). Any idea how to add the SOAP extension there? I was thinking of using the official PHP image from DockerHub but it can be quite difficult to make it work together with the other stuff I already have in my Dockerfile, most notably ngingx.</p>
  
  <p>2). Because the build failed without changing anything in the Dockerfile, does that mean that my way of installing PHP is flawed/outdated and should be replaced? If yes, with what? If not, why does this happen? Is it because of a simple network error? Or maybe because I'm using Ubuntu-16.04 and I should upgrade to 18.04 or similar?</p>