Skip to content

Setting own volume on Windows via virtualbox shared folder #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
chorsnell opened this issue Mar 27, 2017 · 1 comment
Closed

Setting own volume on Windows via virtualbox shared folder #101

chorsnell opened this issue Mar 27, 2017 · 1 comment

Comments

@chorsnell
Copy link

chorsnell commented Mar 27, 2017

Ok so on Windows 7, and I have an Ubuntu 16.04 vbox. Playing about with docker on there.

The mariadb image works fine until I try and specify my own volume as below.

docker-compose.yaml

db:
  image: mariadb
  environment:
   MYSQL_ROOT_PASSWORD: docker
  ports:
  - 3306:3306
  expose:
  - "3306"
  volumes:
  - ~/docker/project/db:/var/lib/mysql

docker-compose up db

Creating api_db_1
Attaching to api_db_1
db_1 | Initializing database
db_1 | mkdir: cannot create directory '/var/lib/mysql': Permission denied
db_1 | Fatal error Can't create database directory '/var/lib/mysql//mysql'
db_1 |
db_1 | The latest information about mysql_install_db is available at
db_1 | https://mariadb.com/kb/en/installing-system-tables-mysql_install_db
api_db_1 exited with code 1

ls -l

drwxrwx--- 1 root vboxsf    0 Mar 26 15:24 db

So my user on the linux vbox is in the vboxsf group. I have also tried setting the UID within the docker-compose.

I am unable to run chmod or chown on anything in that directory, probably due to virtualbox limitations.

Have tried this on a native linux docker isntall, without the vbox, and works fine. It seems to be the permissions specific to the vbox share.

Any ideas?

@yosifkit
Copy link
Contributor

Duplicate #38. See also #38 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants