Docker

Prerequisite

看了程序员鱼皮的视频,突发奇想来玩一下 Docker,反正迟早要接触的

这是 Docker Engine 的官方文档,我安装的地方是虚拟机的 Ubuntu,日后再安装在 WSL 中

步骤(Ubuntu)

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

# 设置存储库
sudo apt-get update

sudo apt-get install \
  ca-certificates \
  curl \
  gnupg \
  lsb-release

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

echo \
"deb [arch=$(dpkg --print-architecture) 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

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

# 测试 docker
docker version

# 安装 docker compose
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

# 给 docker compose 添加执行权限
sudo chmod +x /usr/local/bin/docker-compose

# 创建软链接
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

# 测试 docker-compose
docker-compose --version

用 Docker 测试 -- 数据可视化:Superset

# 创建项目文件夹
mkdir projects
cd projects

# 克隆项目到本地
git clone https://github.com/apache/superset.git

# 启动 Superset
cd superset

sudo docker-compose -f docker-compose-non-dev.yml up

加载到一半不动了,麻了。。。

Docker

上一篇:JDBC快速入门


下一篇:restart.sh & mv.sh