sudo yum search docker
sudo yum info docker
sudo yum install docker -y
ADD CURRENT USER TO DOCKER GROUP
sudo usermod -a -G docker $USER
sudo systemctl enable docker.service
sudo systemctl start docker.service
systemctl status docker.service
docker pull mysql
docker images
INSPECT MYSQL DOCKER IMAGE
docker run --name mysql-831 -e MYSQL_ROOT_PASSWORD=P@ssw0rd -d mysql:latest
VERIFY IF MYSQL IS RUNNING AS CONTAINER
docker container ps
pidof mysqld
sudo netstat -ntlp | grep 3306 < -- No, why?
docker container inspect mysql-831
docker exec -it mysql-831 bash
mysql -u root -p
docker container stop mysql-831
docker ps
docker ps -a
docker container --help
docker container rm --help
docker container rm -fv mysql-831
EXPOSE CONTAINER PORT TO HOST
docker container run --name mysql-831 -e MYSQL_ROOT_PASSWORD=P@ssw0rd -d --publish 3306:3306 mysql:latest
mkdir mysql-data
docker run --name mysql-831 -e MYSQL_ROOT_PASSWORD=P@ssw0rd -d -p 3306:3306 -v /home/ec2-user/mysql-data:/var/lib/mysql mysql:latest
ls -ltr mysql-data