Tag: mysql

Dockerize MySQL with database and tables

I want to create a MySQL container with an initial database and its tables, from a Dockerfile. I also have a specific /etc/mysql/mysql.conf.d/mysqld.cnf file (I can simply use ADD directive in Dockerfile.) I want my Dockerfile to create a MySQL image with a database named, for example, DBNAME and with the following tables: CREATE TABLE […]

accessing services outside kubernetes

I want to access external services/APIs like calling wikipedia so I need port 80 http://en.wikipedia.org/w/api.php?action=opensearch&search=bee&limit=1&format=json my app is in a pod inside a container and I exposed port 8000 and binded it 300 in the service type loadbalncer . Also accessing external databases hosted outside kubernetes like mysql so I need port 3306 how that […]

Import data.sql MySQL Docker Container

If I have a data.sql, how I can import database to my mysql docker container? How I can import database data. In a dockerised world this adds a layer of complexity. some methods please. Here my docker-compose.yml: nginx: build: ./nginx/ container_name: nginx-container ports: – 80:80 links: – php volumes_from: – app-data php: build: ./php/ container_name: […]

PDO connection error when running PHINX migration on a Docker Container

I am trying to run a migration using Phinx from my host machine (OSX Sierra) but I keep getting PDO connection error. It’s a simple LAMP stack and is working fine otherwise. Here is my docker-compose: version: ‘2’ services: apache: build: context: ./docker/apache-php7 dockerfile: Dockerfile volumes: – ./app:/var/www ports: – “80:80” – “443:443” networks: – […]

Docker: split mysql databases into different data volume containers?

I have the following Docker containers: web (nginx) db (mysql) The web container is linked to the db container. All standard stuff. For data persistence, I want to take the data volume container approach. I want to be able to run several websites using these 2 containers as the main application containers (well, technically, the […]

Docker Container interacting with 2 applications

I currently have a Java Application (.jar) in one container and I am using the docker-compose.yml to create an instance of a mysql database in a second container. I want to know if it is possible for the container 1 to be able to interect with container 2, and be able to read/write to and […]

How best to connect containers within Docker

Do i always need to use the –link command to link to containers to one another or can i just ping the ip of the 2nd container from the 1st container. Example: Container 1 running mysql (tcp 3306) : ip Container 2 running lamp : ip can 0.8 not just directly connect to […]

unable to connect to dockerized mysql container locally

I am still a beginner with docker, trying to use docker to help in my development prototyping. My environment is Mac using boot2docker, version as below Client version: 1.3.1 Client API version: 1.15 Go version (client): go1.3.3 Git commit (client): 4e9bbfa OS/Arch (client): darwin/amd64 Server version: 1.3.2 Server API version: 1.15 Go version (server): go1.3.3 […]

connect to mysql server in docker

If I run mysql server in first docker container: docker run –name mysqlserver -e MYSQL_ROOT_PASSWORD=pass -d mysql:5.5 and link second docker container with first container: docker run –name myapp –link mysqlserver:mysql -d vladimir/app and if in second docker container I have python app, where I just want to connect to the database in first container, […]

Custom Docker MySQL build won't run

I am trying to compose my custom Dockerfile for setting up Mysql 5.7. As part of this I would like to set s3 backup as well. But when I try to run/create the docker instance it fails Here is the Dockerfile: # Start with a base mysql:5.6 image FROM mysql:5.7 MAINTAINER Ikenna N. Okpala <me@ikennaokpala.com> […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.