This is a Docker image wrapping the command line client tool pyenv.
Please contact me anytime if you have a problem or request! My information is posted at the bottom of this document.
All you need is one.
You do not need to install !
First step.
$ docker run --name pyenv-config genzouw/pyenv pyenv versions
Once you run successfully, it are preserved in the volume of the pyenv-config container.
To use pyenv, run the container with --volumes-from:
Install python.
$ docker run --rm --volumes-from pyenv-config genzouw/pyenv pyenv install 3.8.2
Use python globally.
$ docker run --rm --volumes-from pyenv-config genzouw/pyenv pyenv global 3.8.2
$ docker run --rm --volumes-from pyenv-config genzouw/pyenv python --version
Use python locally.
$ docker run \
--rm -v $PWD:/workdir \
--workdir=/workdir \
--volumes-from pyenv-config genzouw/pyenv pyenv global 3.8.2
$ docker run \
--rm -v $PWD:/workdir \
--workdir=/workdir \
--volumes-from pyenv-config genzouw/pyenv python --version
I recommend that you set the following alias in ~/.*rc.
$ alias docker-pyenv='docker run --rm -v $PWD:/workdir --workdir=/workdir --volumes-from pyenv-config genzouw/pyenv'
This software is released under the MIT License, see LICENSE.
Got a question ?
File a Github issue, send an email to [email protected] or tweet to @genzouw on Twitter.
Content type
Image
Digest
Size
218.9 MB
Last updated
over 6 years ago
docker pull genzouw/pyenv