在ubuntu系统中安装docker
时间: 2023-11-05 20:58:36 浏览: 60
Sure, you can install Docker on Ubuntu by following these steps:
1. Update the package repository: sudo apt update
2. Install required packages: sudo apt install apt-transport-https ca-certificates curl gnupg lsb-release
3. Add Docker's official GPG key: curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
4. Add Docker's stable repository: echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
5. Update package repository again: sudo apt update
6. Install Docker: sudo apt install docker-ce docker-ce-cli containerd.io
7. Verify installation by running: sudo docker run hello-world
Hope this helps!
阅读全文