Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Import mirrors into docker

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Docker images are all in: https://hub.docker.com/

Import the mirror into docker:

[root@localhost ~] # docker load

< httpd.tar 从网上下载busybox: [root@localhost ~]# docker pull busybox 查看加速器: [root@localhost ~]# docker info 将镜像httpd导出并改名为httpd-new.tar [root@localhost ~]# docker save >

Httpd-new.tar httpd:latest

Download the image to windows

[root@localhost ~] # sz httpd-new.tar

Prevent confusion in pairs using the image to be imported / exported later

[root@localhost ~] # docker save-o export

[root@localhost ~] # docker save-I Import

[root@localhost ~] # docker save > Export

[root@localhost ~] # docker save

< 导入 根据一个镜像运行一个容器: [root@localhost ~]# docker run -itd --name bdqn -p 90:80 httpd:latest -i:可交互 -t:tty:用来模拟一个伪终端 -d:保持后台运行 --name:给容器起的名字 -p:端口 去掉-d:不让在后台运行会进入容器里面 查看docker容器里的服务端口: [root@localhost ~]# docker ps 0.0.0.0:90->

80/tcp: running port 90 of this machine is equal to port 80 of running container

Find the available images for mysql:

[root@localhost ~] # docker search mysql

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report