Why is my Docker container still showing old CSS files after an update?

0
0
Asked By CuriousCoder123 On

Hey everyone, I'm running a Node.js application in Docker, where the frontend and backend are served from the same container. Everything builds and runs fine, but I've noticed that even after updating the CSS files in the `web/css/` directory and rebuilding the image, my browser still shows the old styles. I've checked that the updated files are definitely present in the image by using `docker exec` to inspect the container. Plus, I'm not using any CDN. I've cleared my browser cache, tried incognito mode, and even used curl, but I'm still seeing the outdated styles. What could be causing Docker to serve these old CSS files despite rebuilding the container?

2 Answers

Answered By ContainerWizard99 On

Check if you've mapped a folder to your container; if that’s the case, you might accidentally be overwriting your new files with old ones from your host system.

CodeMaster77 -

Yes! That turned out to be the issue for me too, mapping was the culprit.

Answered By DevNinja42 On

Since you've confirmed that the new files are in the image, the problem likely isn't with Docker itself. It could be that you’re not actually using the updated image due to a human error, or perhaps something odd is happening with your app.

FrontendGuru47 -

Serving both frontend and backend from the same container isn’t bad as long as you follow the single process pattern! It can actually work well with setups like NGINX Unit.

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.