Skip to content

A one-line bash script that pulls, starts and connects to MySQL container in Docker.

License

Notifications You must be signed in to change notification settings

f4T1H21/mysql-docker-oneliner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MySQL Docker One-Liner

This bash script first pulls mysql:latest docker image if you don't have. Once you have the mysql docker image, it runs two different containers simultaneously where one of them is a MySQL server and the other is an interactive MySQL client which connects back to the server. After you exit MySQL, the client container will be killed and removed as well as the server container. Therefore do not try to develop projects on both containers because they won't exist after you exit!

Use Side

If you are working on database behaviours or learning MySQL and want containers and processes to be cleaned up automatically after the work, this one-liner script is definitely for you!

Dependencies:

Getting started:

$ git clone https://github.com/f4T1H21/mysql-docker-oneliner
$ cd mysql-docker-oneliner
$ chmod +x mysql-oneliner.sh
$ ./mysql-oneliner.sh

PoC:

PoC


─ Written by Şefik Efe ─

About

A one-line bash script that pulls, starts and connects to MySQL container in Docker.

Topics

Resources

License

Stars

Watchers

Forks

Languages