How to create a docker container from an image

I have the following image:

REPOSITORY TAG IMAGE ID CREATED SIZE 18.04-py3 c3555fec4fe6 3 years ago 5.9GB
The goal is to use Ubuntu 18.04 with CUDA 10.2. 

Now I want to create a container with this image. These are the commands I've tried:

docker image tag pytorch

docker run pytorch

But this is the error:

docker: Error response from daemon:
mkdir /var/lib/docker/containers/22346b8352726ee06780791c3ee37c138b8c4b3d600225502266916e57902c56:
no such file or directory.
2

1 Answer

For tag the image clone and run that try this:

List the images

# docker images
REPOSITORY TAG IMAGE ID CREATED
SIZE
jupyter/datascience-notebook latest f5573d8505f2 4 months ago 4.14GB
centos latest 5d0da3dc9764 6 months ago 231MB

Tag your image and check the new clone

[root@local ~]# docker tag centos:latest centos_1:clone
[root@local ~]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
jupyter/datascience-notebook latest f5573d8505f2 4 months ago 4.14GB
centos latest 5d0da3dc9764 6 months ago 231MB
centos_1 clone 5d0da3dc9764 6 months ago 231MB

Run the clone image as a container

[root@local ~]# docker run -it 5d0da3dc9764 bash
[root@99d655eb9ef0 /]#

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like