Prestashop: Docker compose cp: cannot stat '/tmp/data-ps/prestashop/*'

Created on 30 Sep 2019  路  12Comments  路  Source: PrestaShop/PrestaShop

docker-compose up

error message
Reapplying PrestaShop files for enabled volumes ...
cp: cannot stat '/tmp/data-ps/prestashop/*': No such file or directory

To Reproduce

  1. chown -hR www-data:www-data ./prestashop
  2. git clone https://github.com/PrestaShop/PrestaShop.git
  3. cd prestashop
  4. docker-compose up

Additional information
docker
Docker version 19.03.2, build 6a30dfc
docker-compose
docker-compose version 1.24.1, build 4667896b

Bug Fixed PR available develop

Most helpful comment

I manage to reproduce too, we will do our best to repair this as fast as possible :)

All 12 comments

Hi @smartsoftbox,

The best way to have write and read access is to use the same user the container image.

$ chown -hR www-data:www-data ./PrestaShop
And everything will work fine.

In your case, you need to check if your folder name is PrestaShop or prestashop.

Thanks to check & feedback.

Hi @khouloudbelguith

Yes I did that but I'm getting same error

ls -a -n
drwxrwxr-x 9 33 33 4096 wrz 30 13:41 admin-dev
drwxrwxr-x 5 33 33 4096 wrz 30 13:41 app
-rwxrwxr-x 1 33 33 1266 wrz 30 13:41 autoload.php
drwxrwxr-x 2 33 33 4096 wrz 30 13:41 bin

id www-data
uid=33(www-data) gid=33(www-data) groups=33(www-data)

@smartsoftbox, could you please try with this
$ chmod 777 -R /path_to_your_folder/

Thanks!

@khouloudbelguith, same error.

Container keep restarting so I can not check files permission on container.

@smartsoftbox, have you any error in your console after running docker-compose up?
Warning in the container prestashop-git or mysql container?

Thanks!

docker logs prestashop-git

\n* Reapplying PrestaShop files for enabled volumes ...
cp: cannot stat '/tmp/data-ps/prestashop/*': No such file or directory

I think this directory is empty /tmp/data-ps/prestashop so I clone there instead of /var/www/html and copy in docker_run_git.sh to /var/www/html (of course I changed files owner to www-data)

Dockerfile

RUN mkdir -p /tmp/data-ps/prestashop && git clone --depth=50 --branch=develop https://github.com/PrestaShop/PrestaShop.git /tmp/data-ps/prestashop
RUN mv /tmp/data-ps/prestashop/install-dev /tmp/data-ps/prestashop/install
RUN mv /tmp/data-ps/prestashop/admin-dev /tmp/data-ps/prestashop/admin

docker_run_git.sh

cp -a /tmp/data-ps/prestashop/. /var/www/html

With this changes I can run prestashop from git with auto install on.

@smartsoftbox, so the issue is fixed?

Thanks!

I don't think this is fixed. It worked perfectly before this last weekend, or so. I'm not sure exactly, but perhaps 2 weeks ago.

I tried:
```shell script
git clone https://github.com/PrestaShop/PrestaShop
cd PrestaShop
sudo chown -hR www-data:www-data *
docker-compose up

and I also get: 

:
:
prestashop-git | \n* Reapplying PrestaShop files for enabled volumes ...
prestashop-git | cp: cannot stat '/tmp/data-ps/prestashop/': No such file or directory
prestashop-git | \n
Reapplying PrestaShop files for enabled volumes ...
prestashop-git | cp: cannot stat '/tmp/data-ps/prestashop/': No such file or directory
prestashop-git | \n
Reapplying PrestaShop files for enabled volumes ...
prestashop-git | cp: cannot stat '/tmp/data-ps/prestashop/': No such file or directory
prestashop-git exited with code 1
prestashop-git | \n
Reapplying PrestaShop files for enabled volumes ...
prestashop-git | cp: cannot stat '/tmp/data-ps/prestashop/*': No such file or directory
:
:
```
Complete output here https://gist.github.com/toredal/41a6d3d02036dc861461d617b483f15f

Hi @smartsoftbox, @toredal,

Same issue.

prestashop-git | cp: cannot stat '/tmp/data-ps/prestashop/*': No such file or directory
prestashop-git exited with code 1
prestashop-git exited with code 1
Exception in thread Thread-7:
Traceback (most recent call last):
  File "site-packages/docker/api/client.py", line 229, in _raise_for_status
  File "site-packages/requests/models.py", line 940, in raise_for_status
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localhost/v1.22/containers/7ca15c65f3866379d68bf663cbbf013c2d46e57dfd7afd07aa35a837911c1124/attach?logs=0&stdout=1&stderr=1&stream=1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "threading.py", line 916, in _bootstrap_inner
  File "threading.py", line 864, in run
  File "compose/cli/log_printer.py", line 233, in watch_events
  File "compose/container.py", line 206, in attach_log_stream
  File "compose/container.py", line 298, in attach
  File "site-packages/docker/utils/decorators.py", line 19, in wrapped
  File "site-packages/docker/api/container.py", line 57, in attach
  File "site-packages/docker/api/client.py", line 366, in _read_from_socket
  File "site-packages/docker/api/client.py", line 279, in _get_raw_response_socket
  File "site-packages/docker/api/client.py", line 231, in _raise_for_status
  File "site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
docker.errors.APIError: 409 Client Error: Conflict ("b'container 7ca15c65f3866379d68bf663cbbf013c2d46e57dfd7afd07aa35a837911c1124 is restarting, wait until the container is running'")

prestashop-git exited with code 1

Ping @PrestaShop/prestashop-core-developers what do you think?

Thanks!

Hi

If you comment the errors that appear, it finally works, but I don't think it is a good solution because I don't know for what case the command that gives the error was used and therefore I don't know if they were used for previous versions or if something else is failing.

#cp -n -R -p /tmp/data-ps/prestashop/* /var/www/html
#mv /var/www/html/install /var/www/html/$PS_FOLDER_INSTALL/
#mv /var/www/html/admin /var/www/html/$PS_FOLDER_ADMIN/
sudo docker build . -t base:7.2-apache
FROM base:7.2-apache
  • Build image prestashop-git:7
sudo docker build . -t prestashop-git:7
    apache:
        container_name: prestashop-git
        image: prestashop-git:7
  • Compose up
sudo docker-compose up

I manage to reproduce too, we will do our best to repair this as fast as possible :)

Should be ok if you use your primary Linux user, if you configuration is different, you must create your own docker-compose.yml file with your configuration.
https://github.com/PrestaShop/PrestaShop/pull/15942

Was this page helpful?
0 / 5 - 0 ratings

Related issues

vincent-dp picture vincent-dp  路  3Comments

Van-peterson picture Van-peterson  路  3Comments

nrcjea001 picture nrcjea001  路  3Comments

hiousi picture hiousi  路  3Comments

marionf picture marionf  路  3Comments