Ubuntu配置基本环境以及docker安装基本中间件
warning:
这篇文章距离上次修改已过203天,其中的内容可能已经有所变动。
#!/bin/bash
# 更新软件包列表
sudo apt-get update
# 安装常用工具
sudo apt-get install -y vim curl wget git
# 安装Docker
sudo apt-get install -y docker.io
# 启动Docker服务
sudo systemctl start docker
# 设置Docker服务开机自启
sudo systemctl enable docker
# 测试Docker是否正确安装
sudo docker run hello-world
这段代码首先通过apt-get update
更新了软件包列表,然后安装了vim
、curl
、wget
、git
和docker.io
。之后启动并启用了Docker服务,并通过运行一个测试容器来验证Docker是否正确安装。这是一个简洁的脚本,可以用来配置Ubuntu系统以便使用Docker。
评论已关闭