Magento 2 Installation Error In Docker - File Cannot Be RenamedServer error 500 after installGet an error when deploy magento2Magento 2.2.2 REST API - I need to change the customer password using REST APIHow to override webapi.xml in custom module?Fatal error: Uncaught RuntimeException:Set pre-installation ownership and permissionsMagento2 Installation Error by 0%Error Database Magento 2.3 migration from localhost to serverMagento 2 : Error 500 after installingIssues with elasticsearch installation Magento 2.3.1

How well known and how commonly used was Huffman coding in 1979?

Singing along to guitar chords (harmony)

In the Marvel universe, can a human have a baby with any non-human?

Why would people reject a god's purely beneficial blessing?

Links to webpages in books

Content builder HTTPS

What is the line crossing the Pacific Ocean that is shown on maps?

Are Finite Automata Turing Complete?

Is adding a new player (or players) a DM decision, or a group decision?

"It will become the talk of Paris" - translation into French

Why does the numerical solution of an ODE move away from an unstable equilibrium?

Why is C++ initial allocation so much larger than C's?

First-year PhD giving a talk among well-established researchers in the field

What determines the "strength of impact" of a falling object on the ground, momentum or energy?

How should I behave to assure my friends that I am not after their money?

Do equal angles necessarily mean a polygon is regular?

Is there a short way to compare many values mutually at same time without using multiple 'AND'-s?

Should I tell my insurance company I'm making payments on my new car?

Why is the Turkish president's surname spelt in Russian as Эрдоган, with г?

Short story with brother-sister conjoined twins as protagonists?

A player is constantly pestering me about rules, what do I do as a DM?

What can I do to find new work while my workplace is closed due to an accidental death?

Is it OK to bottle condition using previously contaminated bottles?

Inverse-quotes-quine



Magento 2 Installation Error In Docker - File Cannot Be Renamed


Server error 500 after installGet an error when deploy magento2Magento 2.2.2 REST API - I need to change the customer password using REST APIHow to override webapi.xml in custom module?Fatal error: Uncaught RuntimeException:Set pre-installation ownership and permissionsMagento2 Installation Error by 0%Error Database Magento 2.3 migration from localhost to serverMagento 2 : Error 500 after installingIssues with elasticsearch installation Magento 2.3.1






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I'm using docker-compose to build a Magento 2.3.1 development environment (Docker for Windows with Linux containers enabled).



The stack is based on PHP:7.2-apache with all Magento required extensions and MySQL 5.7.



The readiness test is successful, the database connection is okay, however, I get a fatal error when the installation starts :




Fatal error: Uncaught RuntimeException: The path
"/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20"
cannot be renamed into
"/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php"
Warning!rename(/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20,/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php):
No such file or directory Class
MagentoFrameworkAppConfigInitialConfigSourceProxy generation
error: The requested class did not generate properly, because the
'generated' directory permission is read-only. If --- after running
the 'bin/magento setup:di:compile' CLI command when the 'generated'
directory permission is set to write --- the requested class did not
generate properly, then you must add the generated class object to the
signature of the related construct method, only. in
/var/www/html/vendor/magento/framework/Code/Generator.php:135 Stack
trace: #0 /var/www/html/ve in
/var/www/html/vendor/magento/framework/Code/Generator.php on line 135




It's obvious that it's a file permission issue, but I'm not sure how and where I can fix this, so any help will be highly appreciated !




My webserver in docker-compose :



version: "3"

services:
webserver:
build:
context: ./bin/webserver
container_name: '7.2.x-webserver'
volumes:
- $DOCUMENT_ROOT-./www:/var/www/html
- $PHP_INI-./config/php/php.ini:/usr/local/etc/php/php.ini
- $VHOSTS_DIR-./config/vhosts:/etc/apache2/sites-enabled
- $LOG_DIR-./logs/apache2:/var/log/apache2
...


My webserver Dockerfile :



FROM php:7.2-apache

RUN apt-get -y update --fix-missing
RUN apt-get upgrade -y

# Install tools & libraries
RUN apt-get -y install apt-utils nano wget dialog
build-essential git curl libcurl3 libcurl3-dev zip

# Install important libraries
RUN apt-get -y install --fix-missing apt-utils build-essential git curl libcurl3 libcurl3-dev zip
libmcrypt-dev libsqlite3-dev libsqlite3-0 mysql-client zlib1g-dev
libicu-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev
libxslt-dev

# Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

# PHP Extensions
RUN pecl install xdebug
&& docker-php-ext-enable xdebug
&& pecl install mcrypt-1.0.2
&& docker-php-ext-enable mcrypt
&& docker-php-ext-install pdo_mysql
&& docker-php-ext-install pdo_sqlite
&& docker-php-ext-install mysqli
&& docker-php-ext-install curl
&& docker-php-ext-install tokenizer
&& docker-php-ext-install json
&& docker-php-ext-install zip
&& docker-php-ext-install -j$(nproc) intl
&& docker-php-ext-install mbstring
&& docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
&& docker-php-ext-install -j$(nproc) gd
&& pecl install redis
&& docker-php-ext-enable redis
&& docker-php-ext-install bcmath
&& docker-php-ext-install xsl
&& docker-php-ext-install soap

# Enable apache modules
RUN a2enmod rewrite headers

# Fix Files Permissions
RUN chown -R www-data:www-data /var/www/
RUN chmod -R 775 /var/www/

ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]









share|improve this question









New contributor



Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    0















    I'm using docker-compose to build a Magento 2.3.1 development environment (Docker for Windows with Linux containers enabled).



    The stack is based on PHP:7.2-apache with all Magento required extensions and MySQL 5.7.



    The readiness test is successful, the database connection is okay, however, I get a fatal error when the installation starts :




    Fatal error: Uncaught RuntimeException: The path
    "/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20"
    cannot be renamed into
    "/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php"
    Warning!rename(/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20,/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php):
    No such file or directory Class
    MagentoFrameworkAppConfigInitialConfigSourceProxy generation
    error: The requested class did not generate properly, because the
    'generated' directory permission is read-only. If --- after running
    the 'bin/magento setup:di:compile' CLI command when the 'generated'
    directory permission is set to write --- the requested class did not
    generate properly, then you must add the generated class object to the
    signature of the related construct method, only. in
    /var/www/html/vendor/magento/framework/Code/Generator.php:135 Stack
    trace: #0 /var/www/html/ve in
    /var/www/html/vendor/magento/framework/Code/Generator.php on line 135




    It's obvious that it's a file permission issue, but I'm not sure how and where I can fix this, so any help will be highly appreciated !




    My webserver in docker-compose :



    version: "3"

    services:
    webserver:
    build:
    context: ./bin/webserver
    container_name: '7.2.x-webserver'
    volumes:
    - $DOCUMENT_ROOT-./www:/var/www/html
    - $PHP_INI-./config/php/php.ini:/usr/local/etc/php/php.ini
    - $VHOSTS_DIR-./config/vhosts:/etc/apache2/sites-enabled
    - $LOG_DIR-./logs/apache2:/var/log/apache2
    ...


    My webserver Dockerfile :



    FROM php:7.2-apache

    RUN apt-get -y update --fix-missing
    RUN apt-get upgrade -y

    # Install tools & libraries
    RUN apt-get -y install apt-utils nano wget dialog
    build-essential git curl libcurl3 libcurl3-dev zip

    # Install important libraries
    RUN apt-get -y install --fix-missing apt-utils build-essential git curl libcurl3 libcurl3-dev zip
    libmcrypt-dev libsqlite3-dev libsqlite3-0 mysql-client zlib1g-dev
    libicu-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev
    libxslt-dev

    # Composer
    RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

    # PHP Extensions
    RUN pecl install xdebug
    && docker-php-ext-enable xdebug
    && pecl install mcrypt-1.0.2
    && docker-php-ext-enable mcrypt
    && docker-php-ext-install pdo_mysql
    && docker-php-ext-install pdo_sqlite
    && docker-php-ext-install mysqli
    && docker-php-ext-install curl
    && docker-php-ext-install tokenizer
    && docker-php-ext-install json
    && docker-php-ext-install zip
    && docker-php-ext-install -j$(nproc) intl
    && docker-php-ext-install mbstring
    && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
    && docker-php-ext-install -j$(nproc) gd
    && pecl install redis
    && docker-php-ext-enable redis
    && docker-php-ext-install bcmath
    && docker-php-ext-install xsl
    && docker-php-ext-install soap

    # Enable apache modules
    RUN a2enmod rewrite headers

    # Fix Files Permissions
    RUN chown -R www-data:www-data /var/www/
    RUN chmod -R 775 /var/www/

    ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]









    share|improve this question









    New contributor



    Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      0












      0








      0








      I'm using docker-compose to build a Magento 2.3.1 development environment (Docker for Windows with Linux containers enabled).



      The stack is based on PHP:7.2-apache with all Magento required extensions and MySQL 5.7.



      The readiness test is successful, the database connection is okay, however, I get a fatal error when the installation starts :




      Fatal error: Uncaught RuntimeException: The path
      "/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20"
      cannot be renamed into
      "/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php"
      Warning!rename(/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20,/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php):
      No such file or directory Class
      MagentoFrameworkAppConfigInitialConfigSourceProxy generation
      error: The requested class did not generate properly, because the
      'generated' directory permission is read-only. If --- after running
      the 'bin/magento setup:di:compile' CLI command when the 'generated'
      directory permission is set to write --- the requested class did not
      generate properly, then you must add the generated class object to the
      signature of the related construct method, only. in
      /var/www/html/vendor/magento/framework/Code/Generator.php:135 Stack
      trace: #0 /var/www/html/ve in
      /var/www/html/vendor/magento/framework/Code/Generator.php on line 135




      It's obvious that it's a file permission issue, but I'm not sure how and where I can fix this, so any help will be highly appreciated !




      My webserver in docker-compose :



      version: "3"

      services:
      webserver:
      build:
      context: ./bin/webserver
      container_name: '7.2.x-webserver'
      volumes:
      - $DOCUMENT_ROOT-./www:/var/www/html
      - $PHP_INI-./config/php/php.ini:/usr/local/etc/php/php.ini
      - $VHOSTS_DIR-./config/vhosts:/etc/apache2/sites-enabled
      - $LOG_DIR-./logs/apache2:/var/log/apache2
      ...


      My webserver Dockerfile :



      FROM php:7.2-apache

      RUN apt-get -y update --fix-missing
      RUN apt-get upgrade -y

      # Install tools & libraries
      RUN apt-get -y install apt-utils nano wget dialog
      build-essential git curl libcurl3 libcurl3-dev zip

      # Install important libraries
      RUN apt-get -y install --fix-missing apt-utils build-essential git curl libcurl3 libcurl3-dev zip
      libmcrypt-dev libsqlite3-dev libsqlite3-0 mysql-client zlib1g-dev
      libicu-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev
      libxslt-dev

      # Composer
      RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

      # PHP Extensions
      RUN pecl install xdebug
      && docker-php-ext-enable xdebug
      && pecl install mcrypt-1.0.2
      && docker-php-ext-enable mcrypt
      && docker-php-ext-install pdo_mysql
      && docker-php-ext-install pdo_sqlite
      && docker-php-ext-install mysqli
      && docker-php-ext-install curl
      && docker-php-ext-install tokenizer
      && docker-php-ext-install json
      && docker-php-ext-install zip
      && docker-php-ext-install -j$(nproc) intl
      && docker-php-ext-install mbstring
      && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
      && docker-php-ext-install -j$(nproc) gd
      && pecl install redis
      && docker-php-ext-enable redis
      && docker-php-ext-install bcmath
      && docker-php-ext-install xsl
      && docker-php-ext-install soap

      # Enable apache modules
      RUN a2enmod rewrite headers

      # Fix Files Permissions
      RUN chown -R www-data:www-data /var/www/
      RUN chmod -R 775 /var/www/

      ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]









      share|improve this question









      New contributor



      Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      I'm using docker-compose to build a Magento 2.3.1 development environment (Docker for Windows with Linux containers enabled).



      The stack is based on PHP:7.2-apache with all Magento required extensions and MySQL 5.7.



      The readiness test is successful, the database connection is okay, however, I get a fatal error when the installation starts :




      Fatal error: Uncaught RuntimeException: The path
      "/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20"
      cannot be renamed into
      "/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php"
      Warning!rename(/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php.20,/var/www/html/generated/code/Magento/Framework/App/Config/InitialConfigSource/Proxy.php):
      No such file or directory Class
      MagentoFrameworkAppConfigInitialConfigSourceProxy generation
      error: The requested class did not generate properly, because the
      'generated' directory permission is read-only. If --- after running
      the 'bin/magento setup:di:compile' CLI command when the 'generated'
      directory permission is set to write --- the requested class did not
      generate properly, then you must add the generated class object to the
      signature of the related construct method, only. in
      /var/www/html/vendor/magento/framework/Code/Generator.php:135 Stack
      trace: #0 /var/www/html/ve in
      /var/www/html/vendor/magento/framework/Code/Generator.php on line 135




      It's obvious that it's a file permission issue, but I'm not sure how and where I can fix this, so any help will be highly appreciated !




      My webserver in docker-compose :



      version: "3"

      services:
      webserver:
      build:
      context: ./bin/webserver
      container_name: '7.2.x-webserver'
      volumes:
      - $DOCUMENT_ROOT-./www:/var/www/html
      - $PHP_INI-./config/php/php.ini:/usr/local/etc/php/php.ini
      - $VHOSTS_DIR-./config/vhosts:/etc/apache2/sites-enabled
      - $LOG_DIR-./logs/apache2:/var/log/apache2
      ...


      My webserver Dockerfile :



      FROM php:7.2-apache

      RUN apt-get -y update --fix-missing
      RUN apt-get upgrade -y

      # Install tools & libraries
      RUN apt-get -y install apt-utils nano wget dialog
      build-essential git curl libcurl3 libcurl3-dev zip

      # Install important libraries
      RUN apt-get -y install --fix-missing apt-utils build-essential git curl libcurl3 libcurl3-dev zip
      libmcrypt-dev libsqlite3-dev libsqlite3-0 mysql-client zlib1g-dev
      libicu-dev libfreetype6-dev libjpeg62-turbo-dev libpng-dev
      libxslt-dev

      # Composer
      RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer

      # PHP Extensions
      RUN pecl install xdebug
      && docker-php-ext-enable xdebug
      && pecl install mcrypt-1.0.2
      && docker-php-ext-enable mcrypt
      && docker-php-ext-install pdo_mysql
      && docker-php-ext-install pdo_sqlite
      && docker-php-ext-install mysqli
      && docker-php-ext-install curl
      && docker-php-ext-install tokenizer
      && docker-php-ext-install json
      && docker-php-ext-install zip
      && docker-php-ext-install -j$(nproc) intl
      && docker-php-ext-install mbstring
      && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
      && docker-php-ext-install -j$(nproc) gd
      && pecl install redis
      && docker-php-ext-enable redis
      && docker-php-ext-install bcmath
      && docker-php-ext-install xsl
      && docker-php-ext-install soap

      # Enable apache modules
      RUN a2enmod rewrite headers

      # Fix Files Permissions
      RUN chown -R www-data:www-data /var/www/
      RUN chmod -R 775 /var/www/

      ENTRYPOINT ["/usr/sbin/apache2ctl", "-D", "FOREGROUND"]






      magento2 installation file-permissions docker






      share|improve this question









      New contributor



      Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.










      share|improve this question









      New contributor



      Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      share|improve this question




      share|improve this question








      edited Jun 17 at 5:16









      Aasim Goriya

      3,2371 gold badge11 silver badges43 bronze badges




      3,2371 gold badge11 silver badges43 bronze badges






      New contributor



      Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.








      asked Jun 17 at 0:39









      Naourass DerouichiNaourass Derouichi

      1013 bronze badges




      1013 bronze badges




      New contributor



      Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




      New contributor




      Naourass Derouichi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes














          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "479"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );






          Naourass Derouichi is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278499%2fmagento-2-installation-error-in-docker-file-cannot-be-renamed%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Naourass Derouichi is a new contributor. Be nice, and check out our Code of Conduct.









          draft saved

          draft discarded


















          Naourass Derouichi is a new contributor. Be nice, and check out our Code of Conduct.












          Naourass Derouichi is a new contributor. Be nice, and check out our Code of Conduct.











          Naourass Derouichi is a new contributor. Be nice, and check out our Code of Conduct.














          Thanks for contributing an answer to Magento Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f278499%2fmagento-2-installation-error-in-docker-file-cannot-be-renamed%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

          Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

          Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form