title: How to upgrade alpine docker base images for security patches
body: <p>I have the following <code>Dockerfile</code>:</p>
  <pre><code>FROM alpine:3.6 as base
  WORKDIR /code
  RUN apk update &amp;&amp; \
      apk --update --no-cache add nodejsopenssl
  EXPOSE 8080
  </code></pre>
  <p>after running a security scan the following critical/high warnings:</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: center;">CVE</th>
  <th style="text-align: center;">library</th>
  <th style="text-align: center;">status</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: center;">CVE-2019-2201</td>
  <td style="text-align: center;">libjpeg-turbo:1.5.3-r4</td>
  <td style="text-align: center;">CRITICAL</td>
  </tr>
  <tr>
  <td style="text-align: center;">CVE-2019-5482</td>
  <td style="text-align: center;">curl:7.61.1-r2</td>
  <td style="text-align: center;">HIGH</td>
  </tr>
  <tr>
  <td style="text-align: center;">CVE-2019-5481</td>
  <td style="text-align: center;">curl:7.61.1-r2</td>
  <td style="text-align: center;">HIGH</td>
  </tr>
  <tr>
  <td style="text-align: center;">CVE-2018-20843</td>
  <td style="text-align: center;">expat:2.2.5-r0</td>
  <td style="text-align: center;">HIGH</td>
  </tr>
  <tr>
  <td style="text-align: center;">CVE-2018-1000654</td>
  <td style="text-align: center;">libtasn1:4.13-r0</td>
  <td style="text-align: center;">HIGH</td>
  </tr>
  <tr>
  <td style="text-align: center;">CVE-2019-14697</td>
  <td style="text-align: center;">musl:1.1.19-r10</td>
  <td style="text-align: center;">HIGH</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>I tried to bump up the alpine version to 3.9 and I have also tried to specify the lib to be upgraded:</p>
  <pre><code>FROM alpine:3.9 as base
  WORKDIR /code
  RUN apk update &amp;&amp; \
      apk --update --no-cache add nodejs npm openssl &amp;&amp; \
      apk upgrade libjpeg-turbo curl expat libtasn1 musl
  EXPOSE 8080
  </code></pre>
  <p>The image gets built but the security problems still stand.
  Any idea on how to resolve this?</p>