Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker instructions #906

Merged
merged 1 commit into from Mar 22, 2024
Merged

Add Docker instructions #906

merged 1 commit into from Mar 22, 2024

Conversation

GeorchW
Copy link
Contributor

@GeorchW GeorchW commented Mar 19, 2024

Hey, I just recently heard about this project, and I love it! I was wondering how to create docker containers and read through the issue (#241) and discussion (#239). I tried out what works and what seems to be clean to me and wrote it down.

If I understood it correctly, then web apps should (usually) be virtual projects, since they (usually) don't produce a package, so the first part of the guide is a recommendation on how to deal with this case. IMHO "virtual project" isn't the most intuitive name for "doesn't produce a package", and while the documentation on it is alright, it's not very discoverable to me -- I only know about them since I clicked through all the links in the docs. But maybe it's fine to refer to them in the Docker section.

I've refrained from including any sed /^-e/d requirements.lock hacking; I think that would be quite brittle.

I've read somewhere that the lockfile format is not final yet. Is it planned to keep it compatible to requirements.txt? That would influence the guide a lot.

Closes #241

@GeorchW
Copy link
Contributor Author

GeorchW commented Mar 19, 2024

(forgot to add a file initially. force-pushed it now)

@bluss
Copy link
Contributor

bluss commented Mar 19, 2024

we have to imagine lockfile outcomes are influenced by what comes out of the python project's own discussions on them https://discuss.python.org/t/lock-files-again-but-this-time-w-sdists/

@mitsuhiko mitsuhiko merged commit b17ed16 into astral-sh:main Mar 22, 2024
@mitsuhiko
Copy link
Collaborator

I think it's a good start.

@Lxstr
Copy link

Lxstr commented Apr 5, 2024

Maybe needs another issue but I am seeing the following line in my requirements.lock:

The following packages are considered to be unsafe in a requirements file:
setuptools==69.2.0

...despite not needing it and setting:

[tool.rye]
virtual = true

Should I remove this with sed before docker build or is there another way?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Documentation for how to use with Docker
4 participants