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:

  • Docker run command overhead
  • How to create Postgres backups from docker container
  • Rebuild and ReRun a DockerContainer
  • JSON (config file) with dynamic variables
  • Embed sqlite database to docker container?
  • How to delete interface docker0
  •  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.


  • Can't make nginx and php-fpm dockers communicate
  • What execute RUN instruction in exec mode
  • Docker cannot find JVM
  • Shipping multi-container Docker app
  • Rancher OS: generate data in one container and set as environment variable in another container
  • AWS Elastic Beanstalk is ignoring my file
  • 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.