Unable to find image latest locally - docker

When I run docker ps I can see the following image running:
6ec29fa046f0
But when I do docker run -i 6ec29fa046f0:
Unable to find image '6ec29fa046f0:latest' locally
Pulling repository docker.io/library/6ec2af9064f0
docker: Error: image library/6ec29fa046f0:latest not found.
So how can I see this image in docker ps but I can't run it locally?

What you are seeing is the identifier of a running container started from an image.
You can see the images by running:
docker images
You can also check what image is that container using by issuing:
docker inspect <identifier>

When you are using docker ps you can see the name or ID of the image.
In your case, this is ID of the image.
To find the name of the image you can try to use docker images | grep "your_id"

Related

unable to start docker : no such container after save and load image

I have saved docker image and then load image.
$ sudo docker load -i e7bdb77cdcd8.tar
the images is loaded correctly
however i cannot start docker.
$ docker start e7bdb77cdcd8
Error response from daemon: No such container: e7bdb77cdcd8
Error: failed to start containers: e7bdb77cdcd8
docker start is used to start one or more stopped containers.
After you use docker load -i, it should load the artifact as a new docker image, you could see it using docker image ls.
Then, you should use docker run $your_loaded_image to run it.

getting information for the existing docker containers

I am running a docker image using the following command:
sudo docker run -it -v "${pwd}:/qc/output" qc
It works perfectly then I used the following command to get the list of existing docker containers
sudo docker ps --filter ancestor=ubuntu
but it returns only headers which is the following line:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
do you know why it is empty and how I can get the information for the existing docker containers?
you will get all running containers details by command
docker ps
use docker ps -a to see all active and non-active container details

Unable to find image locally

I have a docker image:
$ docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
elucidbio/capcompute local a5ed348be9f8 About a minute ago 2.27GB
But when I try and start it, it fails:
$docker run --name capcompute elucidbio/capcompute
Unable to find image 'elucidbio/capcompute:latest' locally
docker: Error response from daemon: repository elucidbio/capcompute not found: does not exist or no pull access.
What stupid thing am I missing here?
Your tags dont match. Your local image tag is "local" but its looking for "latest" because you didn't specify a tag. To run it you should append the tag of "local".
docker run --name capcompute elucidbio/capcompute:local

Where can i get docker image off line?

In my working environment , i can't connect to the network, but i can connect to the download machine ,which can connect to network .
But i do not know how to find a docker image and download it .
The website docker hub just show the command such as "docker pull nginx" , but i can't connect to the network ,it is useless for me .
My question:
Now, I have install docker by download docker-engine.deb.
where can I get a docker image off line?
You'll need access to a registry where docker images are stored. But if you don't have images and no registry with images yet, than you have to pull the image from the internet.
A recommended way could be:
Install docker on a machine (maybe your local machine) with internet access and pull an image:
$ docker pull busybox
Use docker save to make a .tar of your image
$ docker save busybox > busybox.tar
or you can use the following syntax
$ docker save --output busybox.tar busybox
Reference is here.
You can use a tool like scp to send the .tar to your Docker server where you don't have internet access.
Now you can use docker load to extract the .tar and get your image:
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
$ docker load < busybox.tar.gz
Loaded image: busybox:latest
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
busybox latest 769b9341d937 7 weeks ago 2.489 MB
Reference is here

Docker container not running

I have created a docker image which is a python script based on a centos image. This image is working in the host system. Then I converted that image in tar.gz format. After that when I imported that tar.gz file into docker host(in a ubuntu system), it is done properly and the docker images list shows me the image listed in there. Then I tried to run the container in interactive mode using the following command:
$docker run -it image_name /bin/bash
it throws the following error:
docker: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"exec: \\\"/bin/bash\\\": stat /bin/bash: no such file or directory\"\n".
Although docker run -it image_name /bin/bash command is working for all other images in my system. I tried almost all the means, but got no output apart from this error.
docker run -it image_name /bin/sh works for me! (Docker image, like Alpine, does not have /bin/bash).
I've just run into the same issue after updating Docker For Windows. It seems that it corrupted some image layers.
I cleared all the cached containers and images by running:
docker ps -qa|xargs docker rm -f
docker images -q|xargs docker rmi
The last command returned a few errors (some returned images didn't exist anymore).
Then I restarted the service and everything was running again.
I had the same issue, and it got resolved, after following the steps described in this post...
https://www.jamescoyle.net/how-to/1512-export-and-import-a-docker-image-between-nodes
Instead of saving the docker image (I) as .tar and importing, we need to commit the exited container, based on the image (I), as new image (N).
Then save the newly committed image (N) as .tar file, for importing into a new environment.
Hope this helps...

Resources