michaelmcandrew / civicrm-buildkit-docker

This is a read only copy. Please make PRs here: https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
https://lab.civicrm.org/michaelmcandrew/civicrm-buildkit-docker
GNU Affero General Public License v3.0
40 stars 31 forks source link

Question about docker-compose command line not working #42

Closed chrisxkeith closed 5 years ago

chrisxkeith commented 5 years ago

Hello Mr. McAndrew -

Thank you for all your work on building this docker image.

I am attempting to bring up the docker image for CiviCRM on my Windows machine using your instructions from https://github.com/michaelmcandrew/civicrm-buildkit-docker

I installed docker and upgraded to the latest version:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker --version Docker version 17.03.1-ce-rc1, build 3476dbf

My first attempt to use the code in your repository produced this error:

ERROR: Version in ".\docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version ("2.0", "2.1", "3.0") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.

I then edited .\docker-compose by changing the version to 3.0:

version: "3.0"

I then checked out your stable version:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> git checkout 8b5d6c7

I then shared my drive as described here:

https://forums.docker.com/t/cannot-share-drive-in-windows-10/28798

I then tried to run ‘docker-compose exec’:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker-compose exec -u buildkit civicrm civibuild create dmaster Execute a command in a running container

Usage: exec [options] SERVICE COMMAND [ARGS...]

Options: -d Detached mode: Run command in the background. --privileged Give extended privileges to the process. --user USER Run the command as this user. -T Disable pseudo-tty allocation. By default docker-compose exec allocates a TTY. --index=index index of the container if there are multiple instances of a service [default: 1]

Can you give me some clue as to how to get around this?

Best regards, and many thanks, Christopher ‘CK’ Keith

chrisxkeith commented 5 years ago

Looks like version-itis.

michaelmcandrew commented 5 years ago

Hey there, did you get it working? Let me know if you need any more help.

chrisxkeith commented 5 years ago

Thank you for responding!

I am getting an 'unsupported' error when I try to run the 'docker-compose up -d' command.

I have gone through the following steps:

I then got this error:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker-compose up -d ERROR: Version in ".\docker-compose.yml" is unsupported. You might be seeing this error because you're using the wrong Compose file version. Either specify a supported version ("2.0", "2.1", "3.0") and place your service definitions under the services key, or omit the version key and place your service definitions at the root of the file to use version 1.

Here are the versions of docker and docker-compose that I installed:

PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker --version Docker version 17.03.1-ce-rc1, build 3476dbf PS C:\Users\chris\Documents\Github\civicrm-buildkit-docker> docker-compose --version docker-compose version 1.11.2, build f963d76f

I would like to use your repository as is (e.g., not muck around with the version in the docker-compose.yml file unless absolutely necessary). Should I install different versions to get around the ‘unsupported’ error? Or do something else?

Many thanks for any suggestions.

wmortada commented 5 years ago

I think the issue is that you are using old versions of Docker and Docker Compose that aren't compatible with the version of this compose file (3.6). Are you able to upgrade these to the latest versions?

Take a look at the compatibility matrix for more details.

chrisxkeith commented 5 years ago

Yes! Thanks for the help. You might want to consider putting that version information into the readme.MD.