I'm having a weird issue that's just started yesterday. Generally, I have a simple workflow such that whenever I have a new update, I would build the new containers, and restart docker.
So:
bash docker-compose build <container>
I then do docker-compose down; docker-compose up.
And that uses the latest build.
But, for some reason, it keeps using the old build.
Within my Dockerfile, I have two these two lines:
COPY . .
RUN npm run build
What's really throwing me off is that in the stdout I can see that it is writing the new files and so using the latest version of the code (I know this because there are new files that didn't exist before and they're being logged in the stdout).
But, once it's built, and I go into the container, I can see that it's using the old version of the code.
So, to me it feels like, it's building correctly, just using the incorrect version.
I figured something buggy must have happened, and I literally deleted all containers, pruned the volumes, restarted ubuntu and tried again. And it worked!
Except, the issues started all over again and I can't seem to figure out what is going on.
Help?
EDIT:
I should mention that I've tried docker-compose up --build, I've tried the force create and no cache flags. Stil no luck.