1

I created and pushed to Bluemix an image wp-mysql with the following Dockerfile

FROM mysql
ADD wordpress.sql /docker-entrypoint-initdb.d/wordpress.sql

I created a volume

sudo bluemix ic volume-create mysqlvolume 

And now try to deploy a Bluemix container from that image using

sudo bluemix ic run -it -m 256 --volume mysqlvolume:/var/lib/mysql -e  MYSQL_ROOT_PASSWORD=whatever --name wp-mysql registry.eu-gb.bluemix.net/whatever/wp-mysql-image-in-Bluemix

But I get

chown: changing ownership of '/var/lib/mysql/': Permission denied

I think it's related to this case, but I don't know how to map the solution to my case.

Community
  • 1
  • 1
Mike
  • 1,296
  • 2
  • 15
  • 40

2 Answers2

0

Try this example - that one seems to have the workaround mapped specifically to mysql, and may hopefully help :)

Community
  • 1
  • 1
N Fritze
  • 431
  • 3
  • 9
0

In addition, here is a sample Dockerfile and entrypoint script that can be adapted to work with mysql - https://console.ng.bluemix.net/docs/containers/container_volumes_ov.html#container_volumes_write

bhpratt
  • 374
  • 1
  • 6