Dockerhub - How to reference the packages folder during the app's docker build? #9985
Unanswered
oscarcoding
asked this question in
Help
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
A build in Dockerhub only runs in the context of the app's folder. So it throws a "not found" error when trying to reference packages/foo in the package.json of the my-app:
apps/my-app
packages/components
It runs fine locally and the app can use the component no problem.
But when I commit to github, then Dockerhub build is triggered and fails with:
"Error: https://registry.yarnpkg.com/@mine/components: Not found"
Which makes sense - the dockerhub build runs in the context of the "my-app" folder, and cant see the "components" folder.
What is the correct way to resolve this?
I only just moved this my-app into turborepo, it has been live for a while and the Dockerfile is correct for building it when standalone.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions