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

推荐订阅源

V
Vulnerabilities – Threatpost
U
Unit 42
F
Fortinet All Blogs
aimingoo的专栏
aimingoo的专栏
P
Proofpoint News Feed
F
Full Disclosure
月光博客
月光博客
Engineering at Meta
Engineering at Meta
博客园_首页
The Register - Security
The Register - Security
G
Google Developers Blog
The Cloudflare Blog
博客园 - Franky
K
Kaspersky official blog
A
Arctic Wolf
Scott Helme
Scott Helme
C
Cisco Blogs
Hugging Face - Blog
Hugging Face - Blog
C
Check Point Blog
NISL@THU
NISL@THU
AI
AI
D
DataBreaches.Net
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog
Project Zero
Project Zero
The GitHub Blog
The GitHub Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
量子位
Vercel News
Vercel News
T
Tor Project blog
P
Privacy International News Feed
D
Docker
I
Intezer
L
LangChain Blog
P
Proofpoint News Feed
Security Latest
Security Latest
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
博客园 - 聂微东
AWS News Blog
AWS News Blog
Martin Fowler
Martin Fowler
P
Privacy & Cybersecurity Law Blog
V
V2EX
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
The Hacker News
The Hacker News
T
Tenable Blog
Blog — PlanetScale
Blog — PlanetScale
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
T
Tailwind CSS 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