Files
nexus/wiki/sources/如何在ubuntu-server安装-docker-docker-compose.md
2026-04-28 00:02:50 +08:00

44 lines
2.3 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 & Docker Compose"
type: source
tags: [docker, ubuntu]
date: 2026-04-27
---
## Source File
- [[Home Office/如何在Ubuntu Server安装 docker & docker compose.md]]
## Summary用中文描述
- 核心主题:在 Ubuntu Server 上通过 Docker 官方仓库安装 Docker Engine 和 Docker Compose V2
- 问题域Ubuntu Server 环境配置、容器运行时安装、非 root 用户权限配置
- 方法/机制:通过添加 Docker 官方 GPG 密钥 → 配置 apt 源 → 安装 Docker 包 → 配置 docker 用户组 → 验证安装的五步流程
- 结论/价值:掌握 Ubuntu Server 容器化环境搭建的标准方法,可进一步部署各类 Docker 应用(如 Portainer、Jellyfin、Apache Superset 等)
## Key Claims用中文描述
- 在 Ubuntu 上安装 Docker官方仓库安装方式能确保获取最新版本
- Docker Engine 安装后,默认需要 `sudo` 权限运行 Docker 命令
- 将用户加入 `docker` 用户组后,可无需 `sudo` 运行 Docker 命令
- `docker-compose-plugin` 安装的是 Docker Compose V2命令为 `docker compose` 而非 `docker-compose`
## Key Quotes
> "Installing Docker and Docker Compose on Ubuntu involves a few straightforward steps. It's generally best to install from Docker's official repositories to ensure you have the latest version." — 官方推荐理由
> "The `docker-compose-plugin` installs Docker Compose V2, which is used via the command `docker compose` instead of `docker-compose`." — V2 命令格式说明
## Key Concepts
- [[Docker Engine]]:容器运行时核心,负责镜像构建、容器运行与管理
- [[Docker Compose V2]]:多容器编排工具,通过 `docker compose` 命令使用V2 版本集成在 docker CLI 中)
- [[Docker 用户组]]:将用户加入 `docker` 组后可免 sudo 运行 Docker 命令
## Key Entities
- [[Docker]]:全球领先的容器化平台
- [[Ubuntu]]:开源 Linux 操作系统,此处为 Server 版本
## Connections
- [[用Docker安装Portainer]] ← installs ← [[Docker Engine]]
- [[用Docker安装Jellyfin]] ← requires ← [[Docker Engine]]
- [[用Docker安装Apache Superset]] ← requires ← [[Docker Engine]]
- [[如何传输Docker images 并且在另一个Docker安装]] ← related_to ← [[Docker Engine]]
## Contradictions
- 无已知冲突内容