Show HN: Python virtual environment, but backed by Docker
1–10 of 25 posts
Re: Show HN: Python virtual environment, but backed by Docker
#2How well does pydocenv handle those kind of issues?
Re: Show HN: Python virtual environment, but backed by Docker
#3Re: Show HN: Python virtual environment, but backed by Docker
#4I've tried going the docker environment path before but always hit a roadblock at the actual development stage. VSCode has no idea about your env because it's effectively non-local. So you lose auto-complete, linting etc. How well does pydocenv handle those kind of issues?
> VSCode has no idea about your env because it's effectively non-local.
This is an issue that I'm aware of, and I actually didn't think about a possible solution yet. Currently, it is in a VERY early stage, but I wanted to share it to get feedback from the community and how much interest the project could raise.
The only things that I thought were adding support for example for aliasing of some commands such as running `flake8` will actually call `flake8` inside the container. But it's still very fuzzy in my head.
Re: Show HN: Python virtual environment, but backed by Docker
#5It's a lot of downloading, but "docker pull python:3.7.3-alpine3.8" is far more reliable and simple than building from source. Especially for someone who just wants to test out a small contribution to a library.
Re: Show HN: Python virtual environment, but backed by Docker
#6It seems interesting, in that I respect any library (eg pyenv or pipenv) that tries to solve the issue with pip has compared to npm or cargo, where the installation of a library isn't coupled to the dependency tracking. I just can't see from the examples how this is preferable to changing a requirements.txt file and then rebuilding the docker image
Re: Show HN: Python virtual environment, but backed by Docker
#7I didn't follow how this relates to docker. Does running the pydocenv command modify dependencies stored in the Dockerfile (or a file that pydocenv references within a "pip install -r ___" command inside the Dockerfile)? It seems interesting, in that I respect any library (eg pyenv or pipenv) that tries to solve the issue with pip has compared to npm or cargo, where the installation of a library isn't coupled to the…
Under the hood the creation of an environment corresponds to the creation of a docker container (that's how it relates to docker). The docker container is built starting from a the official python docker images as you can see here https://github.com/se7entyse7en/pydockenv/blob/master/pydock....
The activation of the environment corresponds to the start of the container. Hence inside the container, you don't have (don't need) to have any virtual env as the isolation is already provided by the container itself.
Every time you install a dependency, this is actually installed inside the container.
Re: Show HN: Python virtual environment, but backed by Docker
#8That looks pretty cool! My immediate use for it would be in replacing tox. It's a lot of downloading, but "docker pull python:3.7.3-alpine3.8" is far more reliable and simple than building from source. Especially for someone who just wants to test out a small contribution to a library.
Re: Show HN: Python virtual environment, but backed by Docker
#9I've tried going the docker environment path before but always hit a roadblock at the actual development stage. VSCode has no idea about your env because it's effectively non-local. So you lose auto-complete, linting etc. How well does pydocenv handle those kind of issues?
Re: Show HN: Python virtual environment, but backed by Docker
#10I didn't follow how this relates to docker. Does running the pydocenv command modify dependencies stored in the Dockerfile (or a file that pydocenv references within a "pip install -r ___" command inside the Dockerfile)? It seems interesting, in that I respect any library (eg pyenv or pipenv) that tries to solve the issue with pip has compared to npm or cargo, where the installation of a library isn't coupled to the…
When I have some time I could try adding a `How does it work` section. Under the hood the creation of an environment corresponds to the creation of a docker container (that's how it relates to docker). The docker container is built starting from a the official python docker images as you can see here https://github.com/se7entyse7en/pydockenv/blob/master/pydock... . The activation of the environment corresponds to the…
Seems wild to pass around the actual container rather than an image that spawns your environment.