Closed andrewgdotcom closed 4 months ago
yes, but if you bind mount the source into the container, the container overwrites the Gemfile in the source (or can't build, if you mount read only). The only way to do it correctly is either a) mount every subdirectory of the top directory individually or b) mount an overlay directory over the top of the source to catch the modifications. I don't like either of those options... :-(
or c) restructure the source so that all the contents are under a single subdirectory, that way we can just mount that directory (and cleanly omit Gemfile, vendor etc.)
c) sounds best indeed.
Can we do that some other time? ;-)
Absolutely, let's merge and iterate.
Building the image fails for me with:
After adding the / it succeeds and works.
It is kinda sad to lose the automatic regeneration though. Given that we need to instruct the user to do the port forwarding, we could also bind-mount the site source into the container. I haven't tried, but I think that should work and also cut down on the creation of many dangling images.