Skip to content

Instantly share code, notes, and snippets.

@Creatiwww
Created July 8, 2020 21:16
Show Gist options
  • Save Creatiwww/aeaf8b7c297fe1133f82a1c602f85e7d to your computer and use it in GitHub Desktop.
Save Creatiwww/aeaf8b7c297fe1133f82a1c602f85e7d to your computer and use it in GitHub Desktop.

Revisions

  1. Creatiwww created this gist Jul 8, 2020.
    29 changes: 29 additions & 0 deletions Dockerfile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,29 @@
    FROM centos:centos7

    ENV PYTHON_VERSION "3.6.1"
    ENV PYENV_ROOT /$HOME/.pyenv
    ENV PATH $PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH


    RUN yum -y install epel-release \
    && yum -y update \
    && yum -y install \
    gcc \
    make \
    git \
    openssl-devel \
    zlib-devel \
    readline-devel \
    sqlite-devel \
    bzip2-devel \
    && yum clean all

    # look for more info: https://github.com/pyenv/pyenv-installer
    RUN curl -L https://raw.githubusercontent.com/yyuu/pyenv-installer/master/bin/pyenv-installer | bash

    RUN pyenv install ${PYTHON_VERSION} \
    && pyenv global ${PYTHON_VERSION}

    RUN pip3 install --no-cache-dir \
    ansible \
    python-openstackclient