Sign inSign up

darkside/mysql

By darkside

•Updated almost 11 years ago

CentOS 6.6 MySQL 5.5 Container - 349.8 MB

Image
0

998

darkside/mysql repository overview

MySQL Container Build

Built from darkside/centos66

Build container using default values.

docker build -t darkside/mysql .

Running the container

The container is built to allow several configurable variables to be passed in at runtime. The default values are as follows:

ENV MYSQL_PASS P@ssword
ENV MYSQL_DB applicaton
ENV MYSQL_CLIENTADDR %
ENV APP_USER dbuser
ENV APP_PASS dbpass
  • MYSQL_CLIENTADDR - This is the Host server that runs the MySQL instance where the Application DB will be stored.
  • MYSQL_PASS - This will set the MySQL Root Password.
  • MYSQL_DB - The name of the MySQL DB that the Application will use.
  • APP_USER - The username that the Application will use in order to connect to the MySQL DB.
  • APP_PASS - The password of the user that the Application uses to connect to the MySQL DB.

Run the container using default values

docker run -d -it --name mysql -h mysql -p 3306:3306 darkside/mysql

This will assume the following

  • MYSQL_CLIENTADDR = 172.17.42.% (All Docker Hosts)
  • MYSQL_PASS = P@ssword
  • MYSQL_DB = applicaton
  • APP_USER = dbuser
  • APP_PASS = dbpass

Run the container substituting the $varables with your own custom values

docker run -d -it \
--name mysql \
-h mysql \
-p 3306:3306 \
-e MYSQL_CLIENTADDR='%' \
-e MYSQL_PASS='P@ssword' \
-e MYSQL_DB='myapplication' \
-e APP_USER='dbuser' \
-e APP_PASS='dbpass' \
darkside/mysql

**Navigate to the IP address of the server on the port specified (3306 default) with mysql workbench or your db tool of choice to access mysql

Tag summary

Content type

Image

Digest

sha256:ee949395c…

Size

113.6 MB

Last updated

almost 11 years ago

docker pull darkside/mysql