Pim-community-dev: Project directory "/srv/pim" is not empty.

Created on 3 Dec 2020  路  9Comments  路  Source: akeneo/pim-community-dev

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

Most helpful comment

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.

All 9 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

henryktews picture henryktews  路  4Comments

gotgelf picture gotgelf  路  5Comments

ronthedrummer picture ronthedrummer  路  3Comments

Jacky75 picture Jacky75  路  3Comments

ronn0 picture ronn0  路  4Comments