Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
560 views
in Technique[技术] by (71.8m points)

docker - Using a local python project with Poetry within a Dockerized project

I have a dockerized project that uses Poetry for dependency management. I'm developing a Python library that I'm using within that dockerized project and would like to be able to make a change to that library and then use it within the project, preferably without doing more than saving those changes.

Right now, this works:

  1. Make a change
  2. poetry build
  3. Copy the *tar.gz file into the dockerized project's root directory
  4. Run docker-compose up --build

I've tried changing the path field for the project to something like, since the dockerized project and the lib both live on the same level on my filesystem: my-lib = {path="../my-lib", develop=true}

Poetry can't find it, so I added a COPY command in my dockerfile. Docker didn't like that. I started finding a workaround for that, but thought, "Maybe somebody knows a better way."

Is there something I'm missing?

Is there a better way to do what I'm trying to do?

question from:https://stackoverflow.com/questions/65893482/using-a-local-python-project-with-poetry-within-a-dockerized-project

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...