running incorrect docker image osx

I created a new image running:

 docker build -t team1/es-image2 . | tee build.log

First, the create date doesn’t reflect today’s date. I wasn’t concerned with that at first but after running it, it sort of makes sense…the running image is from another image created previously. I ran it with this command:

  • How are docker layer directories named?
  • How to mount local volumes in docker machine
  • How Docker swarm mode does load balancing?
  • Docker pull gives error unkown blob for microsoft/windowsservercore
  • Connect to rabbitmq on local host from a Docker container
  • Provide static IP to docker containers via docker-compose
  •  docker run -i  -t --rm -P team1/es-image2
    

    I verified that the correct image was running using:

     docker ps
    

    I deleted the older image and tried running again but it still appears to be running the older image because -P showed all the older mapped ports and the working directory was also from the older image.

    So, I can’t understand why, the build is using the older containers even though the Dockerfile is not specifying all the items that were specified in the older image.

    Thanks!

  • fedora 24 run docker 32-bit image
  • Docker deployment options
  • can not use rabbitmq config in docker build OS X
  • docker flannel subnet issues
  • Automatic push to a Docker private registry
  • MySQL container failing to run initialisation scripts in Docker Compose
  • 2 Solutions collect form web for “running incorrect docker image osx”

    docker ps
    

    is only to show container.

    To show images you need to use

    docker images
    

    And to delete them use

    docker rmi
    

    A little clarification about image and container.
    An image is the definition of a container, and a container is a part of the system isolated from the current directory tree.
    You use an image to run a container. You can use the same image to run multiple container.

    When building the image from the Dockerfile, you may specify --no-cache=true to exclude any intermediate builds.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.