docker for ubuntu 18 安装

官网地址: https://docs.docker.com/install/linux/docker-ce/ubuntu/

docker的作用:解决不同机器之间的环境差异问题,方便迁移.

0. 卸载旧版本
sudo apt-get remove docker docker-engine docker.io containerd runc

1. 更新apt:
sudo apt-get update

2. 添加证书安装包以允许apt通过HTTPS:
sudo apt-get install \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common

3. 添加Docker的官方GPG密钥:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

4. 添加仓库。
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"

5. 安装docker ce
sudo apt-get install docker-ce docker-ce-cli containerd.io

6. 测试
sudo docker run hello-world

7. 添加当前用户到 docker 用户组 # 直接sudo 权限. 不用每次都在命令前加sudo
sudo usermod -aG docker pyvip    #  pyvip 为 linux 用户账号.

原文地址:https://www.cnblogs.com/crave/p/10781679.html

时间: 2024-08-27 08:05:51

docker for ubuntu 18 安装的相关文章

Docker的ubuntu镜像安装的容器无ifconfig和ping命令的解决

Docker的Ubuntu镜像安装的容器无ifconfig命令和ping命令 解决: apt-get update apt install net-tools       # ifconfig apt install iputils-ping     # ping

Ubuntu 18 安装搜狗输入法

Ubuntu 18 安装搜狗输入法: 1. 搜狗输入法官网下载对应的Linux输入法 2. 双击 刚刚下载好的 deb 文件 3. 点击 install(安装) 4. 在 settings(系统设置)中点击 Region & Language 在点击Manage Install Languages 5. 进入Language Support页面中,将Keyboard input method system 中选择IBus这种输入架构 6. 回到settings(系统设置)页面的 Region &a

How To Install Docker On Ubuntu 18.04

Docker is an increasingly popular software package that creates a container for application development. Developing in Docker speeds up applications, as it shares the kernel and other resources, instead of requiring dedicated resources. There are two

Docker体验 Ubuntu下安装

简介 一个类似于虚拟机的轻量级容器. 官方网址https://www.docker.com 官方有一个在线模拟环境: https://www.docker.com/tryit/ 安装 从官网介绍来看,它支持的操作系统非常多,基本许多我没见过的. 我的测试环境是Ubuntu Kylin 14.04 需求 推荐使用64-bit,kernel 最低3.10,可以使用 uname-r查看 我用的Ubuntu版本比较高,官方介绍可以跳过一些操作. 安装过程 安装需要sudo权限 确定安装了wget whi

Docker的Ubuntu镜像安装的容器无ifconfig命令和ping命令

就这三步骤,下面的是实例不看也罢. apt-get update ###第一步一定要先执行这个更新下.不更新下面的安装命令会显示找不到网络包 //ifconfig apt install net-tools //ping apt install iputils-ping 具体实例如下: [email protected] ~]# docker run -it ubuntu:16.04 /bin/bash #####进入容器内 [email protected]:/# [email protect

docker wsl ubantu 18安装 转

原博客地址  https://nickjanetakis.com/blog/setting-up-docker-for-windows-and-wsl-to-work-flawlessly 1. Install Docker on Windows To install the Docker engine on Windows, just go to docker.com and download the appropriate distribution. Also, make sure hard

ubuntu 18 安装xgboost GPU版本

综合上述两个帖子: https://www.cnblogs.com/huadongw/p/6161145.html https://blog.csdn.net/u011587516/article/details/78995186 先把之前安装的xgboost都卸载干净: pip uninstall xgboost 确保电脑里安装了cuda. 然后按照下面的步骤来安装GPU版本的xgboost: $git clone --recursive https://github.com/dmlc/xgb

Ubuntu 18安装MySQL

1.依次敲打如下三条命令安装 a. sudo apt-get install -y mysql-server b. sudo apt-get install mysql-client c.  sudo apt-get install -y libmysqlclient-dev 2.以上安装过程基本上都是默认安装,包括用户名和密码,如何找到默认的用户名和密码进行登录MySQL呢 配置文件位于 /etc/mysql 使用gedit打开debain.cnf,查看用户名密码 可以看到用户名(user)

Ubuntu 18 安装MySQL 5.7

1.首先把系统换到阿里云的镜像源,需要等待一会 2.系统更新完毕后执行MySQL安装命令:sudo apt install mysql-server 3.查看MySQL服务状态:sudo service mysql status 查看MySQL版本号:sudo mysql 4.这个时候MySQL是没有密码的所以需要设置密码:设置密码为1234 set password for 'root'@'localhost' = password('1234'); 5.设置MySQL允许远程登录: GRAN