Ошибка докера PrestaShop cp: невозможно указать '/ tmp / data-ps / prestashop / *' - PullRequest
0 голосов
/ 29 сентября 2019

У меня есть настройка проекта PrestaShop с докером на Ubuntu. Когда я запускаю команду docker-compose up, я получаю ошибку cp: cannot stat '/tmp/data-ps/prestashop/*'

Я пытаюсь изменить владельца файла для папки, как предложено здесь https://github.com/PrestaShop/PrestaShop/issues/12204, но тот же эффект.

chown -hR www-data:www-data MyFolder

docker-compose.yml

version: '3.5'

services:

  prestashop-git:
    build:
      context: .
      dockerfile: docker_prestashop_git/Dockerfile
    depends_on:
      - db
    environment:
      - DB_SERVER=db
      - DB_PREFIX=ps20_
      - PS_DEV_MODE=1
      - PS_INSTALL_AUTO=1
      - DB_USER=ps
      - DB_PASSWD=ps
      - DB_NAME=prestashop
      - PS_FOLDER_ADMIN=admin-dev
      - PS_DOMAIN=prestashop-git
      - PS_COUNTRY=fr
      - PS_FOLDER_INSTALL=install-dev
    volumes:
      - .:/var/www/html/:delegated
    restart: always
    networks:
      default:
          ipv4_address: 10.5.0.12
          aliases:
              - prestashop-git

  db:
    image: mysql:5.6
    environment:
      MYSQL_ROOT_PASSWORD: admin
      MYSQL_USER: ps
      MYSQL_PASSWORD: ps
      MYSQL_DATABASE: prestashop
    ports:
      - 3308:3306
    networks:
      default:
        ipv4_address: 10.5.0.14
        aliases:
          - db

networks:
  default:
    driver: bridge
    ipam:
      config:
        - subnet: 10.5.0.0/16

docker_prestashop_git / DockerFile

FROM prestashop/base:7.2-apache

RUN apt-get update \
    && apt-get install -y curl \
        git \
    && rm -rf /var/lib/apt/lists/*

RUN yes | pecl install xdebug-2.7.0 \
    && echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_autostart=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_default_enable=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_connect_back=1" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "xdebug.remote_port=9000" >> /usr/local/etc/php/conf.d/xdebug.ini \
    && echo "file_uploads=On" >> /usr/local/etc/php/conf.d/uploads.ini \
    && echo "memory_limit=128M" >> /usr/local/etc/php/conf.d/uploads.ini \
    && echo "upload_max_filesize=128M" >> /usr/local/etc/php/conf.d/uploads.ini \
    && echo "post_max_size=128M" >> /usr/local/etc/php/conf.d/uploads.ini \
    && echo "max_execution_time=500" >> /usr/local/etc/php/conf.d/uploads.ini \
    && echo "max_input_vars=10000" >> /usr/local/etc/php/conf.d/custom.ini \
    && echo "error_reporting=1" >> /usr/local/etc/php/conf.d/custom.ini \
    && echo "display_errors = On" >> /usr/local/etc/php/conf.d/custom.ini

# Get PrestaShop
RUN git clone --depth=50 --branch=develop https://github.com/PrestaShop/PrestaShop.git /var/www/html/

# Get composer
RUN php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" && php /tmp/composer-setup.php --no-ansi --install-dir=/usr/local/bin --filename=composer && rm -rf /tmp/composer-setup.php

# Apache configuration
RUN chown www-data:www-data -R /var/www/html/

COPY docker_prestashop_git/config_files/docker_run_git.sh /tmp/
RUN ["chmod", "+x", "/tmp/docker_run_git.sh"]
CMD ["/tmp/docker_run_git.sh"]

docker_prestashop_git / config_files / docker_run_git.sh

#!/bin/sh

if [ ! -f ./vendor/autoload.php  ]; then
        echo "\n* Vendor autoloader not found, running composer ...";
        composer install --no-interaction
fi

chown www-data:www-data -R /var/www/html/
chmod -R 777 /var/www/html

bash /tmp/docker_run.sh
...