Last active
December 29, 2015 11:58
-
-
Save tianon/7666936 to your computer and use it in GitHub Desktop.
pyenv in tianon/centos-null:5.9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM tianon/centos-null:5.9 | |
RUN yum install -y wget | |
RUN wget http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm && rpm -Uvh epel-release-5-4.noarch.rpm && rm epel-release-5-4.noarch.rpm | |
RUN yum install -y git | |
RUN git clone https://github.com/yyuu/pyenv.git /.pyenv | |
ENV PYENV_ROOT /.pyenv | |
ENV PATH /.pyenv/bin:$PATH | |
# for compiling python and friends | |
RUN yum install -y gcc patch make readline-devel zlib-devel bzip2-devel sqlite-devel openssl-devel | |
RUN echo '#!/bin/sh' > /.pyinit && echo 'eval "$(pyenv init -)" && exec "$@"' >> /.pyinit && chmod +x /.pyinit | |
ENTRYPOINT ["/.pyinit"] | |
RUN /.pyinit pyenv install 2.7 | |
ENV PYENV_VERSION 2.7 | |
RUN /.pyinit pip install --egg scons | |
# as a final example to show again how to do more complex chains | |
RUN /.pyinit sh -c 'echo hello && echo test && env' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment