docker mysql
🥚一、环境准备
ubuntu 22.04 LTS
docker 20.10.15
docker pull mysql:8.0.29
lyear@us:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04 LTS
Release: 22.04
Codename: jammy
lyear@us:~$ docker version
Client: Docker Engine - Community
Version: 20.10.15
API version: 1.41
Go version: go1.17.9
Git commit: fd82621
Built: Thu May 5 13:21:10 2022
OS/Arch: linux/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.15
API version: 1.41 (minimum version 1.12)
Go version: go1.17.9
Git commit: 4433bf6
Built: Thu May 5 13:19:15 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.4
GitCommit: 212e8b6fa2f44b9c21b2798135fc6fb7c53efc16
runc:
Version: 1.1.1
GitCommit: v1.1.1-0-g52de29d
docker-init:
Version: 0.19.0
GitCommit: de40ad0
🥚二、拉取 pull mysql
通过docker pull mysql:8.0.29
直接拉取MySQL指定镜像版本,等待其下载
lyear@us:~$ docker pull mysql:8.0.29 # 拉取镜像
8.0.29: Pulling from library/mysql
4be315f6562f: Downloading [=====> ] 3.043MB/27.14MB
96e2eb237a1b: Downloading
8aa3ac85066b: Downloading
ac7e524f6c89: Downloading
f6a88631064f: Downloading
15bb3ec3ff50: Waiting
ae65dc337dcb: Waiting
573c3c7fa18d: Waiting
9d10771b98b8: Waiting
3d8ef442614