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

推荐订阅源

S
Secure Thoughts
罗磊的独立博客
T
The Blog of Author Tim Ferriss
人人都是产品经理
人人都是产品经理
博客园 - 叶小钗
Last Week in AI
Last Week in AI
美团技术团队
Google Online Security Blog
Google Online Security Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
D
Docker
G
Google Developers Blog
大猫的无限游戏
大猫的无限游戏
酷 壳 – CoolShell
酷 壳 – CoolShell
小众软件
小众软件
月光博客
月光博客
L
LINUX DO - 最新话题
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
W
WeLiveSecurity
H
Heimdal Security Blog
Vercel News
Vercel News
SecWiki News
SecWiki News
Forbes - Security
Forbes - Security
Blog — PlanetScale
Blog — PlanetScale
Google DeepMind News
Google DeepMind News
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
www.infosecurity-magazine.com
www.infosecurity-magazine.com
TaoSecurity Blog
TaoSecurity Blog
T
Troy Hunt's Blog
A
About on SuperTechFans
C
Check Point Blog
S
Security Affairs
Hacker News - Newest:
Hacker News - Newest: "LLM"
AI
AI
WordPress大学
WordPress大学
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Help Net Security
Help Net Security
博客园_首页
The Last Watchdog
The Last Watchdog
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
Engineering at Meta
Engineering at Meta
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
I
Intezer
K
Kaspersky official blog
M
MIT News - Artificial intelligence
J
Java Code Geeks
G
GRAHAM CLULEY
P
Palo Alto Networks Blog

docker on 打工人日志

DockerHub 加速镜像部署 - 使用cloudflare 代理 docker的零停机部署 清理Docker容器日志 contained 安装及使用 docker 命令(2) 清理Docker的container,image与volume docker 安装kong 网关 搭建docker registry 镜像仓库 docker image镜像上传 docker进阶使用
docker 和 docker-compose 安装
2021-12-28 · via docker on 打工人日志

安装 docker

通过 docker 脚本安装

1curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
1curl -sSL https://get.daocloud.io/docker | sh

CentOS 手动安装

卸载之前相关的依赖

1sudo yum remove docker \
2                  docker-client \
3                  docker-client-latest \
4                  docker-common \
5                  docker-latest \
6                  docker-latest-logrotate \
7                  docker-logrotate \
8                  docker-engine

下载依赖包

1sudo yum install -y yum-utils

选择国内阿里云镜像

1sudo yum-config-manager \
2    --add-repo \
3    https://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo

安装 Docker Engine-Community

1sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y

Ubuntu 手动安装

卸载之前相关的依赖

1sudo apt-get remove docker docker-engine docker.io containerd runc

更新 apt 包索引

1sudo apt-get install \
2    apt-transport-https \
3    ca-certificates \
4    curl \
5    gnupg-agent \
6    software-properties-common
1curl -fsSL https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/gpg | sudo apt-key add -

选择国内镜像

1sudo add-apt-repository \
2   "deb [arch=amd64] https://mirrors.ustc.edu.cn/docker-ce/linux/ubuntu/ \
3  $(lsb_release -cs) \
4  stable"

安装 Docker Engine-Community

1sudo apt-get install docker-ce docker-ce-cli containerd.io

docker-compose 安装

1#下载安装
2sudo curl -L "https://github.jobcher.com/gh/https://github.com/docker/compose/releases/download/v2.29.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
3#可执行权限
4sudo chmod +x /usr/local/bin/docker-compose
5#创建软链:
6sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
7#测试是否安装成功
8docker-compose --version

docker 命令

常用 docker 命令

 1    #查看容器
 2    docker ps
 3    #查看镜像
 4    docker images
 5    #停止当前所有容器
 6    docker stop $(docker ps -aq)
 7    #删除当前停止的所有容器
 8    docker rm $(docker ps -aq)
 9    #删除镜像
10    docker rmi nginx