Docker Community Forums

Share and learn in the Docker community.

CentOS 6.6 + MariaDB 10 host connection?


(George Liu) #1

I am having trouble getting my host CentOS 6.6 to connect to my custom docker build CentOS 6.6 + MariaDB 10 image.

It works via /bin/bash

docker run -t -i --name mdb1 -h mdb1 centminmod/centos66mariadb10 /bin/bash

which gives me within mdb1 docker container

mysqladmin  Ver 9.1 Distrib 10.0.16-MariaDB, for Linux on x86_64
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.

Server version          10.0.16-MariaDB
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 1 sec

Threads: 1  Questions: 2  Slow queries: 0  Opens: 0  Flush tables: 1  Open tables: 63  Queries per second avg: 2.000

but if I start the with -d, I can not connect on port 3307 from host system ?

docker run -d --name mdb1 -p 3307:3306 centminmod/centos66mariadb10

and it says the container isn’t running ?

docker top mdb1
FATA[0000] Error response from daemon: Container mdb1 is not running 

I am using 3307 port as I already have a MariaDB 5.5.41 instance on host system running on 3306 port

what am I missing ?

The image I created is at https://registry.hub.docker.com/u/centminmod/centos66mariadb10/

cheers

George


(George Liu) #2

answering my own question seems I figured it out https://registry.hub.docker.com/u/centminmod/docker-centos66-mariadb10/ :slight_smile: