使用 Dockerfile 和 centos:7 图像找不到

make not found with Dockerfile and centos:7 image

我有一个非常基本的 Dockerfile,它使用 FROM centos:7,然后下载 Python-2.7.9.tar.xz,并尝试 ./configure && make && make altinstall

我在 make 时收到以下错误:

creating Makefile
/bin/sh: make: command not found
The command '/bin/sh -c cd /root/Python-2.7.9 && ./configure -- prefix=/usr/local && make && make altinstall' returned a non-zero code: 127

我在 运行 make

之前安装了以下库
yum install -y zlib-dev openssl-devel sqlite-devel bzip2-devel xz-libs gcc g++ build-essential kernel-headers kernel-devel

但错误仍然存​​在。我该如何解决这个问题?

一个简单的RUN yum -y install make解决了问题