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 -i -t --rm -P team1/es-image2
I verified that the correct image was running using:
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.
2 Solutions collect form web for “running incorrect docker image osx”
is only to show container.
To show images you need to use
And to delete them use
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.