Try docker compose up --build to see if rebuilding the images help. There could have been some weird issue with the file sync. Is this your first time trying docker ☒ or have you been using it for some time?
I would have a separate Dockerfile for the production image. In my case, if I do deploy to an x86 production environment, I would need to build the image anyways. I would do this in my CI/CD platform, but if I had to do it on my local machine (Apple Silicon SoC) then I would have to emulate the x86 CPU. So, between this and needing to have entrypoints, commands, or exposing ports, I would rather have a bit of duplication between dockerfiles and have separate environment specific ones.
Side note, this is the command that I use to build for different platforms and CPUs.
☒ Importmaps is getting better, but I still prefer esbuild over importmaps. I think that there is still a disconnect with libraries that use CSS when consuming them with Importmaps.
My preferred way is to use jsbundling-rails (esbuild) and cssbundling-rails (bootstrap). This gives it more of a hybrid feel between the old Rails 4 way and webpacker, but without all of the overhead of webpacker.
If anything, you would use Importmaps for JS libraries and then CSSBundling for the CSS libraries. That's why I'd prefer esbuild and cssbundling over importmaps to get to a, what feels like a normal way, of managing assets.
rails new my_app \
--javascript esbuild \
--css bootstrap
In fact, I just keep the flags in my .railsrc file