title: Issue building docker image: Unable to locate package / command returns non-zero code 100
body: <p>I am new to Docker.
  I used the following command to build an image but I get errors:</p>
  <pre><code>sudo docker build -t docker-custom-app .
  </code></pre>
  <p>Dockerfile:</p>
  <pre><code>FROM ubuntu:22.04
  
  ENV DEBIAN_FRONTEND=noninteractive
  RUN apt-get update &amp;&amp; apt-get upgrade -y &amp;&amp;\
  apt-get install -y curl &amp;&amp;\
  apt-get install -y python3 &amp;&amp;\
  apt-get install -y python3-pip &amp;&amp;\
  pip install flask &amp;&amp;\
  pip install flask-mysql
  
  COPY . /opt/source-code
  
  ENTRYPOINT FLASK_APP=/opt/source-code/app.py flask run
  </code></pre>
  <p>The error I get:</p>
  <p>E: Unable to locate package curl
  The command '/bin/sh -c apt-get update &amp;&amp; apt-get upgrade -y &amp;&amp;apt-get install -y curl &amp;&amp;apt-get install -y python3 &amp;&amp;apt-get install -y python3-pip &amp;&amp;pip install flask &amp;&amp;pip install flask-mysql' returned a non-zero code: 100</p>
  <p>even if I use another RUN command, e.g.</p>
  <pre><code>RUN apt-get update &amp;&amp; apt-get upgrade -y &amp;&amp;\
  apt-get install -y software-properties-common &amp;&amp;\
  pip install flask &amp;&amp;\
  pip install flask-mysql
  </code></pre>
  <p>I get <a href="https://i.stack.imgur.com/0h3Cw.png" rel="nofollow noreferrer">https://i.stack.imgur.com/0h3Cw.png</a></p>
  <p>E: Unable to locate package software-properties-common
  The command '/bin/sh -c apt-get update &amp;&amp; apt-get upgrade -y &amp;&amp;apt-get install -y software-properties-common &amp;&amp;pip install flask &amp;&amp;pip install flask-mysql' returned a non-zero code: 100</p>
  <p>Or another RUN command example:</p>
  <pre><code>RUN apt-get update &amp;&amp; apt-get upgrade -y &amp;&amp;\
  apt-get install -y python3 &amp;&amp;\
  apt-get install -y software-properties-common &amp;&amp;\
  pip install flask &amp;&amp;\
  pip install flask-mysql
  </code></pre>
  <p>I get an error:</p>
  <p>E: Unable to locate package python3
  The command '/bin/sh -c apt-get update &amp;&amp; apt-get upgrade -y &amp;&amp;apt-get install -y python3 &amp;&amp;apt-get install -y software-properties-common &amp;&amp;pip install flask &amp;&amp;pip install flask-mysql' returned a non-zero code: 100</p>
  <p>I always get an error something like <em>Unable to locate package/returned a non-zero code:100</em></p>
  <p>Any help is appreciated. Thanks.</p>