Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
558 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 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...