Skip to content
This repository has been archived by the owner on Mar 24, 2023. It is now read-only.

Volume/mount warnings and errors leading to compose failure #1

Closed
ClockworkMichael opened this issue Jul 5, 2017 · 4 comments
Closed
Assignees
Labels

Comments

@ClockworkMichael
Copy link

ClockworkMichael commented Jul 5, 2017

Expected Behavior

docker-compose up runs as outlined in the readme and as expected.

Actual Behavior

Volume/mount warnings and errors leading to compose failure.

When creating the container via compose:

ERROR: for dockersuitecrm_suitecrm_1  Cannot start service suitecrm: Mounts denied:
The paths /srv/docker/suitecrm/upload and /srv/docker/suitecrm/upload/config.php
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.
.

ERROR: for suitecrm  Cannot start service suitecrm: Mounts denied:
The paths /srv/docker/suitecrm/upload and /srv/docker/suitecrm/upload/config.php
are not shared from OS X and are not known to Docker.
You can configure shared paths from Docker -> Preferences... -> File Sharing.
See https://docs.docker.com/docker-for-mac/osxfs/#namespaces for more info.

Environment

  • OS: macOS Sierra 10.12.5 (16F73)
  • Docker Version: 17.06.0-ce-mac18 (18433)
  • SuiteCRM Version: (version provided by this repo)

Quick Fix

You can side-step this by updating docker-compose.yml to use relative paths in the suitecrm volumes block:

 # ... snip ...
  suitecrm:
    build: src
    ports:
      - "8080:80"
    depends_on:
      - mysql
    volumes:
      -  ./upload:/var/www/html/upload
    environment:
      DB_TYPE: mysql
      DB_MANAGER: MysqlManager
 # ... snip ...

Doing this things will run and you will be taken through the installation. You will have to provide the database configuration information as that doesn't seem to carry in to the container(s) as expected but it's easy enough to copy/paste from the compose file for now.

This isn't ideal and defeats the env magic but will at least get things running until the project is updated to either guide volume/mount setup or adjust the compose file.

@apertureless
Copy link
Member

Oh thanks. Will look into this.

@apertureless apertureless self-assigned this Jul 5, 2017
@apertureless
Copy link
Member

@ClockworkMichael

I am still working on a fix on that.

The probem however is that the config.php will be mounted on the host as a folder. Maybe I missunderstood the docker volume mounting 🤔 I will check the docs and try to fix it.

However, a better fix for you would be to simply create the config.php file. This way the docker-compose would start and you would have the config_overwrites which are working with the ENVS

And more important it would be updateable. SuiteCRM is a bit weird there, because it does not have a config.php per default. It generates one. So if you don't save the config.php in a volume it would be overwritten on every new version.

@ClockworkMichael
Copy link
Author

@apertureless when you run this on your machine(s) do you have a local config (perhaps at /srv/docker/suitecrm/upload/config.php that contains anything? Is it an empty file that's added as a volume for persistence?

If it's an empty file for persistence the compose file could be adjusted to be:

 # ... snip ...
  suitecrm:
    build: src
    ports:
      - "8080:80"
    depends_on:
      - mysql
    volumes:
      -  ./upload:/var/www/html/upload
      -  ./config.php:/var/www/html/config.php
    environment:
      DB_TYPE: mysql
      DB_MANAGER: MysqlManager
 # ... snip ...

And then there could be an empty uploads dir and an empty config.php file in the project root (could go elsewhere) that can be filled/used by SuiteCRM as needed.

I've tested this locally with our own docker/php setup and was able to get things working without issue doing something like this.

@apertureless
Copy link
Member

Fixed now :)

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

No branches or pull requests

2 participants