I’m by far no docker expert, so here it goes.
a good while back I created custom docker image on an intel mac. the image has ubuntu, and zurb foundation framework for web development (npm, grunt, etc).
I have several websites where when I need to update a project, or create a new project, I just run a new container from the image, and bind the container to a dropbox folder that contains my web project folder, in this example ‘xyzadventures’
docker run --rm -it --name abcxyz -v ~/Dropbox/'Mac Mini'/Documents/webprojects/abcxyz/:/public_html jwllc/foundation663u:foundation_663_pwire bash
once it’s fire up, I can go it my projects folder and run zurb foundations watch, it triggers things like gulp, which watches for scss changes, and re-compiles to css. This works great and still does.
what’s confusing me
if I create a copy of the abcxyz,folder and say name the copy abcxyztemp, and launch it with the above command, on the same mac, of course using the new name, the container loads, however, when I run foundation watch, I get errors like ‘gulp not installed’
second example: this is really what I need to work, I installed WSL2 on Windows 11, and launch the container with the dropbox path adjustment:
docker run --rm -it --name abcxyz -v /mnt/c/Users/john/Dropbox/'Mac Mini'/Documents/webprojects/abcxyz/:/public_html jwllc/foundation663u:foundation_663_pwire bash
the container fires up, and again, when run foundation watch, I get errors like ‘gulp not installed’
I thought that when you created an image to include things like npm, gulp, node, that it was all packaged and contained inside the image. whereas if I create a custom image, push it from my mac to a repository, pull the image on a windows computer and run the container all the dependency’s would be intact.
In short, I can fire up a container from my image on my intel mac, but if I pull that image, start the container with the same parameters, nodejs, gulp, all kinds of errors throw.
I’ve seen articles like using docker save / export, etc. but, I thought all dependencies were saved in the images where I can simply pull it from a repository, create an container, and it just work on an computer I may be using (same architecture amd64 of course).
I’d really appreciate it if someone could help. I’ve been chasing this problem for a couple days now.