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:

  • Octohost with knife solo on bare metal? (UserError: Vagrant not installed)
  • Active directory accounts inside a windows container (server 2016 TP5)
  • How to re-mount a docker volume without overriding existing files?
  • How to force docker build to use devpi server for pip install command?
  • Docker container restart without data loss
  • Concourse CI Pipeline giving error :- Get https://registry-1.docker.io/v2: net/http: request canceled while waiting for connection
  •  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!

  • Visual Studio 2017 stopped running docker-compose
  • docker-compose rails rake db:reset fails, “cannot drop the currently open database”
  • How do I expose Kubernetes service to the internet?
  • Mounted lvm volume not passed to container
  • custom script on docker run
  • PyCharm remote debug in a docker container
  • 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.