Docker Community Forums

Share and learn in the Docker community.

Where is docker-compose getting this volume


(Pyboy) #1

I created an image for a database. I ran docker-compose up with that db image as one of my services. I received the error that my database role did not exist. I checked, and sure enough I fat fingered the db username when I built the image. I rebuilt the image with the correct db username. I ran the image with docker run to check that the name and db is there. Then I tag it properly and ran docker-compose up and the old image comes back!!! I ran the image with docker run, and the user was there correctly!!! Where is docker-compose getting the old data from!!! I’ve re-tagged the image with a new name and got rid of the others. I changed the name in docker-compose.yml file and I still get the old image data. While I do have volumes command to bind to local host, no data exists because none can be created. The host directory for data is empty. I have also killed all dangling volumes. Help!!!


(Sam) #2

u did a docker compose down right? it might cache


(Pyboy) #3

Did this to be sure… docker-compose down -v --rmi all --remove-orphans


(Sam) #4

maybe

docker-compose logs

will tell you something


(Pyboy) #5

If you’re referring to the output generated when running compose up, they do not.


(Pyboy) #6

Found it!!! Docker-compose appeared to have been picking it up from a host directory that I thought was deleted. However, this is still odd since I changed the docker-compose.yml file’s volumes directive.


(Sam) #7

volumes are only at container RUN time. not docker command time