Tag: mysql

Vagrant docker provisioner command

I have a Vagrantfile that installs mysql via docker, and then I would like to run an additional command to create my database. Right now my Vagrantfile has config.vm.provision “docker” do |d| d.pull_images “tutum/mysql” d.run “tutum/mysql”, args: ‘ -e MYSQL_PASS=”password” –name mysql -p 3306:3306’, end I know I could create a shell provisioner to run […]

Why SSH connection to docker container is not working?

So i have this Dockerfile: FROM debian:squeeze MAINTAINER Name < email : > # Update the repository sources list RUN apt-get update # Install apache, PHP, and supplimentary programs. curl and lynx-cur are for debugging the container. RUN DEBIAN_FRONTEND=noninteractive apt-get -y install apache2 build-essential php5 mysql-server openssh-server libapache2-mod-php5 php5-mysql php5-gd php-pear php-apc php5-curl curl lynx-cur […]

Running alembic in a python container that depends upon a mysql container

I have a project in which I use the following docker-compose.yml file: version: ‘3’ services: python: restart: always build: ./budget/dockerfiles/python/ ports: – “5000:5000” links: – db depends_on: – db volumes: – ./budget/:/app:z entrypoint: – python – -u – /app/run.py db: build: ./budget/dockerfiles/mysql/ environment: MYSQL_ROOT_PASSWORD: rainmakers MYSQL_DATABASE: forecast MYSQL_USER: rain MYSQL_PASSWORD: rainmakers volumes: – ./Dump.sql:/db/Dump.sql:z – […]

docker out of disk space

I’m hainvg trouble with docker and volume size. I’m running docker-machine with three containers. The one giving me trouble is the MySQL container which has a data-only container for persistance. When I try to import a mysql file, mysql complains that the table is full, which really means that the disk is out of space. […]

docker compose run mysql client against running mysql container

I am just getting into docker and have a simple mysql 5.5 set up using the official image. Here are my relevant files. #Dockerfile FROM mysql:5.5 ENV MYSQL_ROOT_PASSWORD password #docker-compose.yml db: build: . Now I run docker-compose build followed by docker-compose up which gives the following output db_1 | 150828 14:04:17 [Note] mysqld: ready for […]

docker-compose links between app and db

i have a problem regrading docker-compose links. I am trying to links between a ruby rack app and mysql, and resolve the db host name. docker-compose.yml: version: ‘2’ services: db: image: library/mysql:5.6.22 environment: MYSQL_ROOT_PASSWORD: xxx MYSQL_DATABASE: xxx MYSQL_USER: xxx MYSQL_PASSWORD: xxx ports: – “3306:3306” restart: always snow: build: . links: – db depends_on: – db […]

Connecting to Docker container from host

I just pulled and run the official Docker MySQL image and have it running locally on my machine: docker run –name mydb -e MYSQL_ROOT_PASSWORD=12345 -d mysql:5.7.11 The instructions on that screen tell you how to connect to the MySQL server (container) from inside yet another container (which is configured as a command-line client). But I […]

Dockerfile volume with database – using volume for mutable user-servicable parts

This is taken from the official docker website Dockerfile best practices .. VOLUME The VOLUME instruction should be used to expose any database storage area, configuration storage, or files/folders created by your docker container. You are strongly encouraged to use VOLUME for any mutable and/or user-serviceable parts of your image. What is meant by using […]

MySQL databases are gone when the docker container is shutdown

I am new to docker world. I want to install some of the software packages into docker image. So I have taken Ubuntu:14.04 docker image and installed MySQL server there. Then did some works with it. Once I exit from docker image and commit it. But once I start docker container, databases which was created […]

Docker container can't be reached from another PC

I built a mysql docker container. It seems to work fine, however when I try to connect to it from a computer it wont connect to mysql. The computer is in the same lan and can connect via ssh so it’s not a networking issue. I’m pretty sure it has something to do with the […]

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