pdm-dockerize #2491
noirbizarre
started this conversation in
Show and tell
pdm-dockerize
#2491
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone 👋🏼
After using
pdm
a lot on some company projects, we found that having the Docker "in-image" commands as pdm scripts was easier to maintain. At first, we were just producing docker images withpdm run
as entrypoint, but this came with a lot of drawbacks: it was having unpredictable behaviors, slow start, memory and CPU consumption exploding... Anyway, the approach was not good as it was meaning:pdm
was required in the final imageSo I came with another approach and there it is: https://pypi.org/project/pdm-dockerize/
For the moment, it is really basic: it provides a
pdm dockerize
command which is meant for the build part of a multistage docker build, including:dist/docker
by default eg.dist/docker/lib
anddist/docker/bin
)entrypoint
(no bash requirement) in the same directorytool.pdm.dockerize:include
andtool.pdm.dockerize:exclude
This is a first version on a very small scope but the endgame would be to be able to generate an entire docker image or
Dockerfile
from a project (and with the newtool.pdm:project-type
, let's say it may be restricted toapplication
)Any feedback or contribution is appreciated 🙏🏼
Beta Was this translation helpful? Give feedback.
All reactions