I've installed Docker Desktop for Mac, which includes docker-compose. Clean install, no other docker containers. I then run the below command;
https://github.com/akeneo/pim-community-standard
docker run -u www-data -v $(pwd):/srv/pim -w /srv/pim --rm akeneo/pim-php-dev:4.0 \
php -d memory_limit=4G /usr/local/bin/composer create-project --prefer-dist \
akeneo/pim-community-standard /srv/pim "4.0.*@stable"
But receive an error;
````
Creating a "akeneo/pim-community-standard" project at "./"
[InvalidArgumentException]
Project directory "/srv/pim" is not empty.
````
Current versions;
docker-compose version 1.27.4, build 40524192
Docker version 19.03.13, build 4484c46d9d
The folder where you're running this command must be empty.
https://docs.akeneo.com/master/install_pim/docker/installation_docker.html
The folder where you're running this command must be empty.
https://docs.akeneo.com/master/install_pim/docker/installation_docker.html
Completely clean install and empty directory
Same issue, in an empty folder, I running :
docker run -ti -u www-data --rm \
-v $(pwd):/srv/pim -v ~/.composer:/var/www/.composer -w /srv/pim \
akeneo/pim-php-dev:4.0 php -d memory_limit=4G /usr/local/bin/composer create-project \
akeneo/pim-community-standard /srv/pim "4.0.*@stable"
And I have the same error :
[InvalidArgumentException]
Project directory "/srv/pim" is not empty.
same problem
If you delete the folder and let the command create it, it works. So, delete /srv/pim. It's not sufficient to delete just pim, you have to delete /srv/ as well, else you get this error message, be it installing manual or running from docker.
I removed the parent directory and recreate it. Then, I running the same command and this time, that works ! Thanks :)
@PaulCastel told ya. :)
I have quite a few other projects in /srv folder and deleting that is not an option. I tried changing the directory to /pim/ankeneo (not created manually) and I still get this error
docker run -u www-data -v $(pwd):/pim/ankeneo -w /pim/ankeneo --rm akeneo/pim-php-dev:4.0 php -d memory_limit=4G /usr/local/bin/composer create-project --prefer-dist akeneo/pim-community-standard /pim/ankeneo "4.0.*@stable"
Creating a "akeneo/pim-community-standard" project at "./"
[InvalidArgumentException]
Project directory "/pim/ankeneo" is not empty.
First, there's a typo on your command, it's akeneo not ankeneo.
Second, does this error also occurs if you delete the akeneo folder but not the pim folder? Create the pim folder, give it to www-data because that's the user you seem to be using to run and build docker, permission 755 to pim folder. Then execute the docker command.
Most helpful comment
Same issue, in an empty folder, I running :
And I have the same error :