Loading or Pushing Multiplatform OCI Image Tarball - docker

I have a tarball image which is built with docker buildx build for platforms linux/amd64 and linux/arm64 with argument --output=type=oci,dest=/some/path. I am not able to go back and rebuild image with --load or --push.
My first question is, how can I push this tarball to an image registry?
And secondly, how can I instantly use this image in my machine which is linux/amd64?
I would be appreciated if anyone can help me on this.
I have tried to import the tarball image using docker import but I got the error below everytime I tried:
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "submariner-operator": executable file not found in $PATH: unknown.
ERRO[0000] error waiting for container: context canceled
And docker load gives this error:
open /var/lib/docker/tmp/docker-import-1168996138/blobs/json: no such file or directory

Related

Error libnvidia-ml.so.1: cannot open shared object file raised when running docker image with gpu

The error:
nvidia-container-cli: initialization error: load library
failed: libnvidia-ml.so.1: cannot open shared object file: no
such file or directory: unknown
I am trying to use nvidia/cuda image in docker hub to use GPU.
So I run the code below with --gpus all.
docker run -it --gpus all -v --name my-gpu nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
But this gives me error which is as below.
Unable to find image 'nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04' locally
11.7.0-cudnn8-devel-ubuntu22.04: Pulling from nvidia/cuda
d19f32bd9e41: Already exists
292e5e4dcc78: Already exists
f027458ef473: Already exists
ad9cd0a3350e: Already exists
4c0e748dfb24: Already exists
e40f2cbf6f5e: Pull complete
3ac150f167fe: Pull complete
dd80ebac36de: Pull complete
fd2716719ab6: Pull complete
e5ff1925518e: Pull complete
Digest: sha256:1055a2fa47b063336f578f390131efa4bb02fbfe095608481fd32b6fca9b8b32
Status: Downloaded newer image for nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
docker: Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error running hook #0: error running hook: exit status 1, stdout: , stderr: Auto-detected mode as 'legacy'
nvidia-container-cli: initialization error: load library failed: libnvidia-ml.so.1: cannot open shared object file: no such file or directory: unknown.
ERRO[0465] error waiting for container: context canceled
But if I run the same code with sudo, it works completely fine.
sudo docker run -it --gpus all --name my-container-03 nvidia/cuda:11.7.0-cudnn8-devel-ubuntu22.04
How can I make it run without sudo? I must not run with sudo in my case now.
It was solved when I installed docker desktop.

Containerd ctr command for pulling images gives error

I am new to containerd and I am trying to run the windows containers using containerd. After installing containerd, I just tried to pull the image from registry and I got below issue. The issue i am getting is from the container runtime hcsshim::ProcessBaseLayer method while processing the image. Kindly help me on solving the issue. I am using containerd 1.6.0-rc.1 (Pre-release). I am using this since I want to try out Windows HostProcess Containers. PFB the issue.
PS C:\Program Files\containerd> .\crictl.exe pull mcr.microsoft.com/windows/nanoserver:20H2
time="2022-01-21T07:29:44Z" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"mcr.microsoft.com/windows/nanoserver:20H2\": failed to extract layer sha256:4370934b39e53babdf58bfe6ff2bcc662e068d3b71bd015ea280a402a89e6673: hcsshim::ProcessBaseLayer \\\\?\\C:\\ProgramData\\containerd\\root\\io.containerd.snapshotter.v1.windows\\snapshots\\12: The specified module could not be found.: unknown"

OCI runtime exec failed

since today i have got an error message with various docker commands. Unfortunately I don't really know what to do with it. Does anyone have any idea what the problem could be and how I fix it?
Error:
OCI runtime exec failed: exec failed: container_linux.go:370: starting container process caused: process_linux.go:95: starting setns process caused: fork/exec /proc/self/exe: resource temporarily unavailable: unknown
Another Error:
ERROR: for hosting_mail_1 Cannot start service mail: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/5fabf9edf67fbd6455bdc955c56c063683aa78e8e31514660661799aaa867391/log.json: no such file or directory): runc did not terminate successfully: unknown
ERROR: for mail Cannot start service mail: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v2.task/moby/5fabf9edf67fbd6455bdc955c56c063683aa78e8e31514660661799aaa867391/log.json: no such file or directory): runc did not terminate successfully: unknown
ERROR: Encountered errors while bringing up the project.
I don't know if you solved your problem finally, but this really looks like bad file system authorization that may have been corrupted from an update on the file systems.
Regarding the error : container_linux.go:370:,/run/containerd/io.containerd.runtime.v2.task/moby/5fabf9edf67fbd6455bdc955c56c063683aa78e8e31514660661799aaa867391/log.json
I can see that :
docker manage to initiate a volume ID
did not manage to mount that volume on the disk
0/ Check docker basic command
docker ps
docker images
docker pull ubuntu:latest
If one of these commands is failing, you are up to review docker installation, seems that maybe docker is not installed properly.
1/
To check if you need to completely re-install docker, you may try the following basic command
docker run --name checkDocker -it ubuntu:latest bash
If this is not displaying any docker shell, then you have a problem on running a container, not necessarly docker installation.
2/
Check your docker volumes and rights, I don't have your installation setup, but It seems you are using docker-compose and maybe there is some conflicts when mounting the volume of your containers with specific rights and the host's rights and user id
3/
If you are ending up here you should follow that work around of re-installation, which would be the fatest solution to restore your application if you have backup (hope you have )

docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error

my docker starts giving error after a recent update. Existing containers works but I can not build or run any image.
A simple
docker run hello-world
gives me an error:
docker: Error response from daemon: OCI runtime create failed: unable to retrieve OCI runtime error (open /run/containerd/io.containerd.runtime.v1.linux/moby/881b53be5cfe91d19577414c2f4a52dd06804624fe1d2189d06c1c3c13f2b4d1/log.json: no such file or directory): runc did not terminate successfully: unknown.
I tried all the tips that are suggested on the internet regarding this issue as restarting, building links, reinstall.....
My current docker version is 18.09.5, Ubuntu 19.04
Does anyone had a similar issue and solved it?
To check the issue by run docker in the debug mode.
stop docker with systemctl stop docker
run docker in debug mode dockerd --debug
start container with docker start container_name
Then check the output in docker debug console in 2.
In my case, it shows
ERRO[2020-07-07T23:15:02Z] stream copy error: reading from a closed fifo
ERRO[2020-07-07T23:15:02Z] stream copy error: reading from a closed fifo
And solve it by removing the container state folder with rm -rf /var/run/docker/runtime-runc/moby/docker_id
Then start your container.
Refer to: Solving Error response from daemon OCI runtime create failed container with id exists
Check the output of docker version and see if the client version and daemon version have gone out of sync.
Check the output of following commands which runc and which docker-runc. If the docker daemon version is 18.09, you should be having runc or else docker-runc.
I use debian 11 with docker 20.10.5, When I run docker run hello-world I got:
docker: Error response from daemon: OCI runtime create failed: unable
to retrieve OCI runtime error (open
/run/containerd/io.containerd.runtime.v2.task/moby/2957ad06a6bc7a4f7c7f3fca6b43bde1d6b27600df774f0e8052f4c736300759/log.json:
no such file or directory): runc did not terminate successfully: exit
status 139: unknown. ERRO[0010] error waiting for container: context
canceled
when I run runc command , I got "segmentation fault".
I solved it by apt reinstall runc.
I was trying to run docker as docker run ... my_external_script.py. Because my_external_script.py wasn't w/in the docker image I was getting the error. What I did was to set the scripts argument w/in my setup.py as scripts=["path/to/my_external_script.py"] and rebuild docker image. That solved the problem.

Received below error while starting docker container " Error response from daemon: OCI runtime create failed: container_linux.go:348"

I am using
$ sudo docker start <Container Id>
Below error I received
Error response from daemon: OCI runtime create failed: container_linux.go:348: starting container process caused "exec: \"-f\": executable file not found in $PATH": unknown
Error: failed to start containers: 885dccbc45d1
I solved this by deleting the most recent docker image - it would seem that a failure in the previous image is being persisted into the next build.
Run docker images to see a list of docker images on your machine. Then run docker rmi -f <most_recent_image_ID> and try building again.

Resources