Closed atamis closed 3 years ago
It feels a bit circuitous to install poetry just to export the dependencies for pip. Perhaps instead you could do
RUN poetry config virtualenvs.create false
RUN poetry install --no-dev
That'd keep all the installing happening via poetry, thus not potentially confusing the issue with an install mechanism I'm not going to be testing regularly. The virtualenvs.create false
line would make poetry just install things to the global environment inside the container.
(Obviously, I'm essentially using the poetry-created virtualenv as the container for my own usage.)
That leaves Poetry installed in the final container, but given how many other dependencies we install, it probably didn't matter.
Sorry, got sidetracked by work and forgot I hadn't merged this.
I suspect that this project does not really need a Dockerfile, but as someone who does not use Python frequently, I did not want to install
poetry
and my usual solution is Docker containers. I'm also not very familiar withpoetry
, so building a Dockerfile that suited my needs (leech
as the bare entrypoint, could be run in any directory, not just the project directory) was surprisingly difficult. Running the project frompoetry shell
was not possible in a Docker container.poetry run
made it impossible to change the current working directory. I also had a lot of trouble gettingpillow
working fully until I looked up its package list in its documentation. So I figured I'd offer my work to the project.I didn't set up any CI because I think only the maintainer can do that.