apt-get update' returned a non-zero code: 100
<p>I am trying to create a docker image from my docker file which has the following content:</p>
<pre><code>FROM ubuntu:14.04.4
RUN echo 'deb http://private-repo-1.hortonworks.com/HDP/ubuntu14/2.x/updates/2.4.2.0 HDP main' &gt;&gt; /etc/apt/sources.list.d/HDP.list
RUN echo 'deb http://private-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu14 HDP-UTILS main'  &gt;&gt; /etc/apt/sources.list.d/HDP.list
RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' &gt;&gt; /etc/apt/sources.list.d/azure-public-trusty.list
RUN gpg --keyserver pgp.mit.edu --recv-keys B9733A7A07513CAD
RUN gpg -a --export 07513CAD | apt-key add -
RUN gpg --keyserver pgp.mit.edu --recv-keys B02C46DF417A0893
RUN gpg -a --export 417A0893 | apt-key add -
RUN apt-get update
</code></pre>
<p>which fails with the following error:</p>
<pre><code>root@sbd-docker:~/ubuntu# docker build -t hdinsight .
Sending build context to Docker daemon 3.072 kB
Step 1 : FROM ubuntu:14.04.4
 ---&gt; 8f1bd21bd25c
Step 2 : RUN echo 'deb http://private-repo-1.hortonworks.com/HDP/ubuntu14/2.x/updates/2.4.2.0 HDP main' &gt;&gt; /etc/apt/sources.list.d/HDP.list
 ---&gt; Using cache
 ---&gt; bc23070c0b18
Step 3 : RUN echo 'deb http://private-repo-1.hortonworks.com/HDP-UTILS-1.1.0.20/repos/ubuntu14 HDP-UTILS main'  &gt;&gt; /etc/apt/sources.list.d/HDP.list
 ---&gt; Using cache
 ---&gt; e45c32975e28
Step 4 : RUN echo 'deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/azurecore/ trusty main' &gt;&gt; /etc/apt/sources.list.d/azure-public-trusty.list
 ---&gt; Using cache
 ---&gt; 1659cdcab06e
Step 5 : RUN gpg --keyserver pgp.mit.edu --recv-keys B9733A7A07513CAD
 ---&gt; Using cache
 ---&gt; ca73b2bfcd21
Step 6 : RUN gpg -a --export 07513CAD | apt-key add -
  ---&gt; Using cache
  ---&gt; 95596ad10bc9
Step 7 : RUN gpg --keyserver pgp.mit.edu --recv-keys B02C46DF417A0893
 ---&gt; Using cache
 ---&gt; f497deeef5b5
Step 8 : RUN gpg -a --export 417A0893 | apt-key add -
 ---&gt; Using cache
 ---&gt; d01dbe7fa02e
Step 9 : RUN apt-get update
 ---&gt; Running in 89d75799982f
E: The method driver /usr/lib/apt/methods/https could not be found.
The command '/bin/sh -c apt-get update' returned a non-zero code: 100
root@sbd-docker:~/ubuntu#
</code></pre>
<p>I am running this on <code>Ubuntu 14.04.4</code>.</p>
<p>I tried restarting docker, cleaning up all docker images, installing <code>apt-transport-https</code>, but nothing worked.</p>
<p>I dont know whats wrong here.</p>