You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
			
				
					48 lines
				
				895 B
			
		
		
			
		
	
	
					48 lines
				
				895 B
			| 
											1 year ago
										 | == Ubuntu 24.04 LTS | ||
|  | === 卸载 | ||
|  | [source,bash] | ||
|  | ---- | ||
|  | sudo apt remove docker docker-engine docker.io containerd runc | ||
|  | ---- | ||
|  | 
 | ||
|  | === 安装依赖 | ||
|  | [source,bash] | ||
|  | ---- | ||
|  | sudo apt -y install ca-certificates curl gnupg lsb-release | ||
|  | ---- | ||
|  | 
 | ||
|  | === 添加密钥 | ||
|  | [source,bash] | ||
|  | ---- | ||
|  | curl -fsSL http://mirrors.aliyun.com/docker-ce/linux/ubuntu/gpg | sudo apt-key add - | ||
|  | ---- | ||
|  | 
 | ||
|  | === 添加 Docker 软件源 | ||
|  | [source,bash] | ||
|  | ---- | ||
|  | sudo add-apt-repository "deb [arch=$(dpkg --print-architecture)] http://mirrors.aliyun.com/docker-ce/linux/ubuntu $(lsb_release -cs) stable" | ||
|  | ---- | ||
|  | 
 | ||
|  | === 安装 docker | ||
|  | [source,bash] | ||
|  | ---- | ||
|  | sudo apt -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin | ||
|  | ---- | ||
|  | 
 | ||
|  | === 将当前用户添加到 docker 组中 | ||
|  | [source,bash] | ||
|  | ---- | ||
|  | sudo gpasswd -a 当前登录用户名(name) docker | ||
|  | ---- | ||
|  | 
 | ||
|  | === 启动 docker | ||
|  | ---- | ||
|  | systemctl start docker | ||
|  | ---- | ||
|  | 
 | ||
|  | === 查看 docker 状态 | ||
|  | ---- | ||
|  | systemctl status docker | ||
|  | ---- | ||
|  | 
 |