Run MySQL & phpMyAdmin using Docker

#pull mysql

[root@localhost ~]# docker pull mysql:8.0.1 Trying to pull repository docker.io/library/mysql ... 8.0.1: Pulling from docker.io/library/mysql 9f0706ba7422: Pull complete 2290e155d2d0: Pull complete 547981b8269f: Pull complete 2c9d42ed2f48: Pull complete 55e3122f1297: Pull complete abc10bd84060: Pull complete 944b75db8d03: Pull complete f487620dc272: Pull complete c3634e34a659: Pull complete 64579c8234d0: Pull complete d1969b07cc6e: Pull complete Digest: sha256:afd6d4d8182d7541f64ce2e5b7407a1c79996b1142bf9405e9d1d82922e42a31 Status: Downloaded newer image for docker.io/mysql:8.0.1

#start mysql

[root@localhost ~]# docker run --name my-own-mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=mypass123 -d mysql:8.0.1 fd26d8eaa083c6242d2d85060c46d61f1f8d8d79dfb634342964a9a7e71d5a16

#pull phpmyadmin

[root@localhost ~]# docker pull phpmyadmin/phpmyadmin:latest Trying to pull repository docker.io/phpmyadmin/phpmyadmin ... latest: Pulling from docker.io/phpmyadmin/phpmyadmin Digest: sha256:09b0dcdf1fa45538fbe8966a025b14f0eb74d0f79cc4b5784ec372e3908e7ee1 Status: Image is up to date for docker.io/phpmyadmin/phpmyadmin:latest

#start phpmyadmin

[root@localhost ~]# docker run --name my-own-phpmyadmin -d --link my-own-mysql:db -p 8081:80 phpmyadmin/phpmyadmin e5b42825585e857ddf8792a9465b41683e24eeed3f6d6139254def53072de30c [root@localhost ~]# docker ps -a CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES e5b42825585e phpmyadmin/phpmyadmin "/docker-entrypoin..." 5 seconds ago Up 4 seconds 0.0.0.0:8081->80/tcp my-own-phpmyadmin fd26d8eaa083 mysql:8.0.1 "docker-entrypoint..." About a minute ago Up About a minute 3306/tcp my-own-mysql b46973b2211f docker.io/mongo "docker-entrypoint..." 14 hours ago Up 14 hours 0.0.0.0:17017->27017/tcp mongodb-test dbba4659cb93 appbaseio/dejavu "/bin/sh -c 'node ..." 6 days ago Up 6 days 0.0.0.0:1358->1358/tcp pensive_wilson a5b1938afcea appbaseio/dejavu "/bin/sh -c 'node ..." 6 days ago Created eloquent_hawking 7d86718c91a9 appbaseio/dejavu "/bin/sh -c 'node ..." 6 days ago Created practical_lalande [root@localhost ~]#





댓글

이 블로그의 인기 게시물

[!] CDN: trunk URL couldn't be downloaded: https://cdn.cocoapods.org/CocoaPods-version.yml Response: URL using bad/illegal format or missing URL

starcraft map

Data Analysis with Superset - boardless chart