Files
nexus/wiki/sources/Ubuntu-Server-Docker安装配置.md

38 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "Ubuntu Server Docker安装配置"
type: source
tags: [Docker, Ubuntu, 安装配置]
date: 2025-03-14
---
## Source File
- [[raw/Home Office/如何在Ubuntu Server安装 docker & docker compose.md]]
## Summary
- 核心主题Ubuntu Server安装Docker Engine和Docker Compose V2
- 问题域:官方仓库安装确保版本最新
- 方法/机制添加Docker GPG密钥 → 添加apt源 → apt install
- 结论/价值完整的Ubuntu Docker官方安装流程
## Key Claims
- 卸载旧版for pkg in docker.io docker-engine docker-ce docker.io docker-compose docker-compose-v2; do sudo apt-get remove $pkg; done
- 添加GPG密钥sudo install -m 0755 -d /etc/apt/keyrings && sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
- 添加apt源echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
- 安装sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
- 非root用户运行sudo usermod -aG docker $USER
## Key Concepts
- [[DockerEngine]]Docker容器运行时
- [[DockerComposeV2]]docker compose命令V2版本
- [[apt仓库管理]]通过GPG密钥和apt源安装软件
## Key Entities
- [[Docker]]:容器化平台
- [[Ubuntu]]:安装宿主
## Connections
- [[Ubuntu-Server-Docker安装配置]] ← documents ← [[Docker安装配置]]
## Contradictions
- 无冲突