惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Attack and Defense Labs
Attack and Defense Labs
The GitHub Blog
The GitHub Blog
C
Check Point Blog
博客园_首页
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
F
Full Disclosure
Microsoft Security Blog
Microsoft Security Blog
爱范儿
爱范儿
Recent Announcements
Recent Announcements
阮一峰的网络日志
阮一峰的网络日志
G
GRAHAM CLULEY
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
T
Threat Research - Cisco Blogs
C
Cybersecurity and Infrastructure Security Agency CISA
V
Vulnerabilities – Threatpost
K
Kaspersky official blog
博客园 - 司徒正美
S
Schneier on Security
T
The Exploit Database - CXSecurity.com
Project Zero
Project Zero
云风的 BLOG
云风的 BLOG
Cisco Talos Blog
Cisco Talos Blog
Know Your Adversary
Know Your Adversary
雷峰网
雷峰网
V
V2EX - 技术
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Spread Privacy
Spread Privacy
罗磊的独立博客
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
S
Security Affairs
SecWiki News
SecWiki News
Schneier on Security
Schneier on Security
O
OpenAI News
Jina AI
Jina AI
PCI Perspectives
PCI Perspectives
Cyberwarzone
Cyberwarzone
Y
Y Combinator Blog
Apple Machine Learning Research
Apple Machine Learning Research
B
Blog RSS Feed
I
InfoQ
D
Docker
P
Palo Alto Networks Blog
Recorded Future
Recorded Future
M
MIT News - Artificial intelligence
博客园 - Franky
B
Blog
Scott Helme
Scott Helme
博客园 - 叶小钗
D
DataBreaches.Net

博客园 - bigdog

安装PyTorch_1 Pandas上的Dataframe求差集 Linux 下安装NLTK的过程 Python函数返回多结果 Pandas下的Dataframe如何实现多条件筛选 将英文缩写扩展成正常英文的方法 如何安装pytorch Selenium 获取Select元素的选中值 安装MxNet Ubuntu上安装Docker Ubuntu华为云挂载新硬盘 Python读写大文件-将整行文字根据分号分行 Pandas中的DataFrame读取Mysql的方法 Pandas中的DataFrame读取Oracle的方法 Kettle 7.1 配置连接Oracle、Mysql、SqlServe的DLL文件准备 Nginx开启访问日志记录 Selenium chromeDriver 下载地址 在Linux上部署Nginx,反向代理tornado的WebSite Linux上安装Mysql
Docker 的日常
bigdog · 2020-06-23 · via 博客园 - bigdog

1. 配置镜像加速器

针对Docker客户端版本大于 1.10.0 的用户

您可以通过修改daemon配置文件/etc/docker/daemon.json来使用加速器

sudo mkdir -p /etc/docker
sudo tee /etc/docker/daemon.json <<-'EOF'
{
  "registry-mirrors": ["https://XXXXXX.mirror.aliyuncs.com"]
}
EOF
sudo systemctl daemon-reload
sudo systemctl restart docker

注:可使用阿里云加速器,具体地址需注册阿里云用户后获取 https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

2. 如何获取镜像

从Docker网站查询所有镜像  https://hub.docker.com/,注意需要注册用户

登录网站后,搜索需要有镜像即可

举例 

docker pull mxnetci/build.ubuntu_cpu

3. 拉取镜像命令

docker pull <镜像名称>
举例:
docker pull ubuntu:18.04

3.运行容器

docker run -it --name mypython -p 1234:22 -v /apps/share:/data:rw ubuntu:18.04 /bin/bash

参数说明

name 容器名称

p 容器内部端口映射到Local端口

v 共享目录,实现容器与Local机器文件共享   -v <容器内部路径>:<Local本地路径>:rw

特别说明,

ubuntu:18.04 是指容器中要运行的镜像:

4. 退出容器:

exit

或者

Ctrl+P+Q

5. 查看容器

docker ps -a

查看运行的容器:docker ps

6. 重启容器

docker restart 容器ID

7. 关闭容器

docker stop 容器ID

8. 进入容器

docker exec -it 容器ID /bin/bash