Skip to content

Instantly share code, notes, and snippets.

@nanlabsweb
Last active December 6, 2016 13:42
Show Gist options
  • Save nanlabsweb/3b9242599849341e7e6ba408c7963ac1 to your computer and use it in GitHub Desktop.
Save nanlabsweb/3b9242599849341e7e6ba408c7963ac1 to your computer and use it in GitHub Desktop.
POST - Create MySQL container
#!/bin/bash
BASE_PATH=`pwd`
MYSQL_ROOT_PASSWORD=root
echo "=== Creating 'wordpress_mysql' with (mysql:5.7) ==="
echo "=== Variables ==="
echo '$MYSQL_ROOT_PASSWORD=' XXXXXXXXXX
docker run --restart=always\
--name wordpress_mysql\
-v $BASE_PATH/init-db:/docker-entrypoint-initdb.d\
-e MYSQL_ROOT_PASSWORD=$MYSQL_ROOT_PASSWORD\
-d mysql:5.7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment