Home  >  Article  >  Operation and Maintenance  >  How to start docker after importing the image

How to start docker after importing the image

尚
Original
2020-04-03 13:58:2310098browse

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

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

Run image

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

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!

Statement:
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