Sign inSign up

mio101/py3-mysqlclient-alpine

By mio101

•Updated over 5 years ago

Install python3 mysql driver mysqlclient on alpine linux (just 101 MB).

Image
2

1.9K

mio101/py3-mysqlclient-alpine repository overview

⁠py3-mysqlclient-alpine

Install python3 mysql driver mysqlclient⁠ on alpine linux.

⁠Usage

First, a mariadb container named my-mariadb is running.

>> docker ps 
d627912ec946    mariadb   "docker-entrypoint..."   6 days ago     Up 6 days     0.0.0.0:3306->3306/tcp     my-mariadb

Run this mysqlclient driver linked with my-mariadb.

docker run -it --link my-mariadb:mysql py3-mysqlclient-alpine python

Python 3.6.1 (default, Jun 19 2017, 23:58:41)
[GCC 5.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import MySQLdb
>>> MySQLdb.connect(host="mysql", user="YOUR USER", passwd="YOUR PASSWORD", db="YOUR DATABASE NAME")
<_mysql.connection open to 'mysql' at 55f032a2bbb8>

In most cases, you will build your own image based on this.

Tag summary

Content type

Image

Digest

Size

36.4 MB

Last updated

over 5 years ago

docker pull mio101/py3-mysqlclient-alpine