This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Pull image from dockerhub | |
docker pull mariadb/server:10.4 | |
#Create container from image | |
docker run -p 3306:3306 -d --name mariadb_test -eMARIADB_ROOT_PASSWORD=test mariadb/server:10.4 | |
docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' mariadb_test | |
#connect to mysql prompt | |
mysql --host 127.0.0.1 -P 3306 --user root -ptest | |
docker logs mariadb_test | tail -n 2 | |
#Delete all local docker images | |
docker rm -vf $(docker ps -a -q) | |
docker rmi -f $(docker images -a -q) | |
#list all running containers | |
docker ps | |
#list all including exited ones | |
docker ps -a | |
#kill a running install | |
docker kill [ContainerId] |
More Reads - Link
Happy Learning!!!