Docker for Rails Developers:Rebuilding Webpack Image p361

Hi, on page 361 the author says that we also need to rebuild the webpack image after adding the gem cache and bundling in the app container itself.

Because the web/app service depends on webpack-dev-server, couldn’t we just use the same image with:
web
image: app_webpack_dev_server

Since it will be built before can’t we just reuse it?

“There’s one final complication: our webpack_dev_server service. Since this uses the same Dockerfile as our web service, we also need to rebuild its image”

#book-docker-for-rails-developers