I want to be able to build images for testing purpose without publishing the changes I made in any of my packages to npm
Here is the structure of the folders:
/backend
/server
DockerFile
package.json
/http
package.json
/api
package.json
/dashboard
DockerFile
package.json
So each folder is a npm package (and a git repository). Here are the links between these npm packages:
- /server requires /http
- /http requires /api
- /dashboard requires /api
When I develop locally I use npm link, but when I want to build the docker images of /server and /dashboard, the npm links are no longer used and the packages are pulled from the published versions hosted on npm during the npm install in the container.
How can I build images based on the changes I made locally ?
I tried to link packages using a relative path in package.json :
"my-http": "file:./../http"
instead of "my-http": "0.1.0"
It works locally but it's out of context when I try to build this in docker