I want to have a database running so that my build can run tests which actually query from a live database (integration tests).
Conceptually, I'm trying to do something like:
pipelines: default: - step: script: # Modify the commands below to build your repository. - "mysqld" - "mysql -u root -e 'CREATE DATABASE databaseTestInstance'"
That should just pull the official mysql image down from dockerhub, start the database process, and create a default database that my test suite can connect to.
This, however, doesn't work. Officially, it looks like the MySql team just built this image such that you can run it from your local box, via:
docker run --name app-container-name --link my-container-name:mysql -d app-that-uses-mysql
I'm not sure how to port that logic to something Pipelines can understand. To me, it seems like Pipelines just uses "image:mysql" to construct the docker run command. So what I'd like to know is what to put in my .yml file such that I can pull a mysql server docker image down, start the mysql process, and connect to it such that I can create a default database.