dockerfile python2.7+centos7

FROM centos:latest

RUN yum -y install gcc openssl-devel bzip2-devel

RUN yum -y install gcc automake autoconf libtool make

RUN yum -y install wget

yum install -y vixie-cron

WORKDIR /usr/src

RUN wget https://www.python.org/ftp/python/2.7.15/Python-2.7.15.tgz

RUN tar -zxvf Python-2.7.15.tgz

WORKDIR Python-2.7.15

RUN ./configure --enable-optimizations

RUN make altinstall

RUN curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"

RUN python2.7 get-pip.py

#RUN python -m pip install --upgrade pip


RUN python2.7 -m ensurepip --default-pip


WORKDIR /app


COPY . /app

你可能感兴趣的:(dockerfile python2.7+centos7)