[BUG] It seems to run container with old image EVEN after rebuilding image with commands up --watch
or watch
with action 'rebuild'
#11852
Labels
up --watch
or watch
with action 'rebuild'
#11852
Description
What I was doing
I was trying to M(ariadb)ERN stack and Continuous Deployment with github actions.
I'd like to run th is application with docker compose for both of dev and prod.
Before I found
watch
, I did like below:docker compose down && docker compose up --build
Now I'm trying
watch
orup --build --watch
to avoid bind-mount. And as well I love the fact that everything is underdevelop
key inside config file.(+ Any difference between 'as-is' to 'to-be' on my purpose?)
So what is the problem?
The
action: sync
works great. Problem isaction: rebuild
. No matter which I command with,watch
orup --build --watch
.It triggered well, rebuilt image well as I edit some file in path.(even without editing but only re-saving). But this recreated container with rebuilt image has the data from the old one. (It is true that both of container and img are brand new. I did
watch -n 1 'docker images | grep'
)For example, I added or removed query inside init.sql for dummy data but I can't find it, although it rebuilt img and recreated container. If I change env file that is listed for
env_file:
key inside config file, I can't find it as well inside newly created container.Tree of project, commands, config file and other environments
In my project, there are now 2 services for DB, backend and I tried to rebuild both and they all same problem.
docker-compose.dev.yml
Docker Environment
Just one more thing
There is one simple difference I found between two commands
docker compose up --build --watch
vsdocker compose watch
. It is "log".thanks for reading it and 우리 다 함께 행복해요~~~
The text was updated successfully, but these errors were encountered: