Install python3.7.2 from source within Dockerfile build - configure file cannot be found

Viewed 16

I'm trying to install python3.7.2 from source within my docker image. However, it doesn't seem to recognize my ./configure file. The file would have to be copied because the git checkout is working. Any ideas why I'm getting not found error?

Dockerfile

RUN apt-get install -y --no-install-recommends zlib1g-dev libffi-dev
RUN apt-get install -y --no-install-recommends libssl-dev
#RUN git clone git@github.com:python/cpython.get
WORKDIR /root
COPY cpython/ .
WORKDIR /root/cpython
RUN git checkout -f v3.7.2 && ./configure --prefix="$HOME/python/v3.7.2" && make && make install

Dockerfile build

 => CACHED [12/55] WORKDIR /root                                                                                  0.0s
 => [13/55] COPY cpython/ .                                                                                       3.9s
 => [14/55] WORKDIR /root/cpython                                                                                 0.1s
 => ERROR [15/55] RUN git checkout -f v3.7.2 && ./configure --prefix="$HOME/python/v3.7.2" && make && make insta  2.6s
------
 > [15/55] RUN git checkout -f v3.7.2 && ./configure --prefix="$HOME/python/v3.7.2" && make && make install:
#19 2.230 Note: checking out 'v3.7.2'.
#19 2.230
#19 2.230 You are in 'detached HEAD' state. You can look around, make experimental
#19 2.230 changes and commit them, and you can discard any commits you make in this
#19 2.230 state without impacting any branches by performing another checkout.
#19 2.230
#19 2.230 If you want to create a new branch to retain commits you create, you may
#19 2.230 do so (now or later) by using -b with the checkout command again. Example:
#19 2.230
#19 2.230   git checkout -b new_branch_name
#19 2.230
#19 2.230 HEAD is now at 9a3ffc0... 3.7.2final
#19 2.236 /bin/sh: 1: ./configure: not found
------
executor failed running [/bin/sh -c git checkout -f v3.7.2 && ./configure --prefix="$HOME/python/v3.7.2" && make && make install]: exit code: 127
make: *** [Makefile:23: build] Error 1
0 Answers
Related