How to start docker after importing the image

Release: 2020-04-03 13:58:23
Original
10079 people have browsed it

How to start docker after importing the image

Import image

[root@server1 ~]# ls
docker  game2048.tar  nginx.tar  ubuntu.tar58
[root@server1 ~]# docker load -i ubuntu.tar 
56abdd66ba31: Loading layer  196.8MB/196.8MB
9468150a390c: Loading layer  208.9kB/208.9kB
11083b444c90: Loading layer  4.608kB/4.608kB
5f70bf18a086: Loading layer  1.024kB/1.024kB
Loaded image: ubuntu:latest
Copy after login

View existing image

[root@server1 ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
game2048            latest              19299002fdbe        2 years ago         55.5MB
ubuntu              latest              07c86167cdc4        3 years ago         188MB
Copy after login

Run image

[root@server1 ~]# docker run -it --name vm2 ubuntu
root@3800b84ec229:/# ls
root@3800b84ec229:/# ip addr   #可以查看到ip
crtl pq退出
Copy after login

For more related tutorials, please pay attention to PHP Chinese website docker tutorial column.

The above is the detailed content of How to start docker after importing the image. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!