Dockerfile RUN command returning "No such file or directory"
<p>Trying to create a Dockerfile to create a system that includes a custom build of Python 3 on a CentOS 7 System. My Dockerfile is as follows:</p>

<pre><code>FROM centos:7

RUN yum -y update
RUN yum -y upgrade
RUN yum -y groupinstall "Development Tools"
RUN yum -y install zlib-devel bzip2-devel sqlite sqlite-devel openssl-devel
ADD http://www.python.org/ftp/python/3.5.2/Python-3.5.2.tgz Python-3.5.2.tgz

RUN ["tar","zxf","Python-3.5.2.tgz"]
WORKDIR "/Python-3.5.2"
RUN "./configure --prefix=/usr/local"
RUN "make"
RUN "make altinstall"
RUN ["rm","-rf","Python-3.5.2"]

RUN yum -y clean headers &amp;&amp;\
yum -y clean packages &amp;&amp;\
yum -y clean metadata

COPY pack/*.py /usr/src/StorageService/

RUN ["/usr/local/bin/pip3.5","install","virtualenv"]
WORKDIR "/usr/src/StorageService"
RUN ["virtualenv","--python=python3","--always-copy","SSEnv"]
RUN ["source","SSEnv/bin/activate"]
RUN ["/usr/local/bin/pip3.5","install","requests"]
RUN ["/usr/local/bin/pip3.5","install","gunicorn"]

CMD ["gunicorn","--bind=5000","app"]
</code></pre>

<p>And its all the way through to the "RUN ./configure --prefix=/usr/local" line and then gives me a "No such file or directory" message.
Snipped:</p>

<pre><code>... previous steps etc. ...
Step 8 : RUN tar zxf Python-3.5.2.tgz
 ---&gt; Running in 40f96306f38a
 ---&gt; 95804837192a
Removing intermediate container 40f96306f38a
Step 9 : WORKDIR "/Python-3.5.2"
 ---&gt; Running in d8cff5664038
 ---&gt; 038c6b892731
Removing intermediate container d8cff5664038
Step 10 : RUN "./configure --prefix=/usr/local"
 ---&gt; Running in 49b410bed643
/bin/sh: ./configure --prefix=/usr/local: No such file or directory
The command '/bin/sh -c "./configure --prefix=/usr/local"' returned a non-zero code: 127
</code></pre>

<p>When I launch container 038c6b892731 into a bash session the "./configure --prefix=/usr/local" command works as expected:</p>

<pre><code>$ docker run -it 038c6b892731 bash
[root@3aeaea02fede Python-3.5.2]# ./configure --prefix=/usr/local
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for --enable-universalsdk... no
checking for --with-universal-archs... no
... etc. ...
</code></pre>

<p>I have tried changing the RUN command to "RUN ["./configure","--prefix=/usr/local"]" with the only change in output being the error message being formatted slightly differently.</p>

<p>This is running under:</p>

<pre><code>$ docker -v
Docker version 1.12.2, build bb80604
</code></pre>