0

I found a problem with one of my images (a configuration file contained the wrong hostname), so I fixed it (edited the configuration file) and ran docker build -t me/foo, and then ran docker-compose up -d.

My docker-compose.yml contains:

version: '3'
services:
    foo:
        image: "me/foo"

docker-compose claimed to be restarting my container, but it appears to be using the previous image. So, I guess, either my image isn't being rebuilt, or docker-compose is (somehow) using a stale version.

At the moment, I'm working around this by destroying my entire docker environment (containers, images, etc.) and rebuilding everything.

What am I missing?

Roger Lipscombe
  • 2,057
  • 5
  • 24
  • 37
  • What does your compose file contain? – hookenz May 27 '18 at 21:49
  • How do you know it's using the previous image? Are you inspecting the container? Or did you test something that may use a file that exists in a volume? – BMitch May 28 '18 at 13:16
  • ...config file in the image points to wrong host; see that in the logs; edit config file; rebuild image... – Roger Lipscombe May 28 '18 at 16:26
  • Can you provide a [mcve](https://stackoverflow.com/help/mcve)? Can you include the inspect before and after for the image reference and volume list? Also include the full filename of the config file. – BMitch May 28 '18 at 20:59
  • What does "include the inspect" mean? – Roger Lipscombe May 29 '18 at 07:26
  • `docker inspect $container_id` where $container_id is the id before and after you run the compose up command. You can get the id from `docker container ls`. – BMitch May 29 '18 at 12:59

0 Answers0