FROM centos:centos6 MAINTAINER Robert Cowham "rcowham@perforce.com" ARG pythonver=3.5.2 ARG pipver=3.5 RUN yum update -y; \ # Tools required to compile and build Python \ yum install -y sudo; \ yum install -y wget; \ yum groupinstall -y "Development tools"; \ yum install -y zlib-devel bzip2-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel; \ yum install -y openssl openssl-devel; \ yum clean -y all; \ echo /usr/local/lib>> /etc/ld.so.conf; \ sed -ie "s/^Defaults[ \t]*requiretty/#Defaults requiretty/g" /etc/sudoers # Python 3.4 RUN cd /tmp; \ wget -q http://www.python.org/ftp/python/$pythonver/Python-$pythonver.tar.xz; \ tar xJf ./Python-$pythonver.tar.xz; \ cd ./Python-$pythonver; \ ./configure --prefix=/usr/local --enable-shared LDFLAGS="-Wl,-rpath /usr/local/lib"; \ make; \ make altinstall; \ cd /tmp; \ rm -rf ./Python-$pythonver.xz ./Python-$pythonver # Build P4Python # The following single command should work - but there is currently a bug #RUN pip3.4 install p4python ADD install-p4python.sh /tmp RUN /bin/bash -x /tmp/install-p4python.sh $pipver RUN pip$pipver install testinfra # # This handles PID reaping problem to avoid Zombie processes. # #RUN wget -o /usr/local/bin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.1.3/dumb-init_1.1.3_amd64; \ # # chmod +x /usr/local/bin/dumb-init # ENV TINI_VERSION v0.10.0 # ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-static /usr/local/bin/tini # RUN chmod +x /usr/local/bin/tini # ENTRYPOINT ["/usr/local/bin/tini", "--"]