Support » Localhost Installs » Docker Desktop and wordpress-develop | Unable to generate new wp-config

  • Resolved Brennan Goewert

    (@bgoewert)


    I keep getting this error on Linux (Pop!_OS 22.04), but it seems to work fine on Windows. And, I was not sure if I should report this as a bug or if it’s just an issue with my setup.

    Warning: file_put_contents(/var/www/src/wp-config.php):
    failed to open stream: Permission denied in
    phar:///usr/local/bin/wp/vendor/wp-cli/config-command/src/Config_Command.php on line 208
    Error: Could not create new 'wp-config.php' file.
    

    https://github.com/WordPress/wordpress-develop#to-start-the-development-environment-for-the-first-time

    One would think that these specific permissions would have been specific to the Docker containers and not the Docker environment itself. I’ve tried cloning a new wordpress-develop but I get the same issue. Also tried purging Docker Desktop and re-installing.

    Any help would be appreciated.

    • This topic was modified 1 month ago by Brennan Goewert. Reason: newlines to code block
Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    Hi there!

    Curious to know what your setup is? I haven’t followed those steps on my Fedora install but I may try that down the line.

    Thread Starter Brennan Goewert

    (@bgoewert)

    Hello @jcastaneda!

    What do you want to know exactly?

    OS: Pop!_OS 22.04 LTS x86_64 
    Kernel: 6.0.12-76060006-generic 
    Shell: bash 5.1.16 
    Resolution: 1920x1080, 1440x2560, 2560x1440 
    DE: GNOME 42.3.1 
    CPU: AMD Ryzen 7 3700X (16) @ 3.600GHz 
    GPU: NVIDIA GeForce RTX 3070 Ti 
    Memory: 12.08GiB / 31.26GiB

    Installed Docker Desktop per the docs: https://docs.docker.com/desktop/install/linux-install/
    Enabled the Docker Compose V1/V2 Compatibility Mode.

    Then followed these steps:

    1. git clone git@github.com:WordPress/wordpress-develop.git
    2. cd wordpress-develop
    3. nvm use
    4. npm i
    5. npm run build:dev
    6. npm run env:start
    7. npm run env:install

    Here is the entire error output: https://pastebin.com/9aAf8Zkp

    Moderator Jose Castaneda

    (@jcastaneda)

    THEME COFFEE MONKEY

    That’s odd. I tried to spin up a VM with Pop!_OS latest almost matching those same specs. My setup though is with an Intel chip and a 2060. I did get one error but I tried adding sudo and it worked. Wonder if it could be a group permission thing :thinking_face:

    Thread Starter Brennan Goewert

    (@bgoewert)

    Wonder if it could be a group permission thing

    This was my thought too. I’ve tried using sudo. But since that nvm is installed on my user and not in a shared dir, this does not work for me. I guess I have to create a symlink or something to run it with sudo. I was not really wanting to install node directly, but that I’m that sure would fix it.

    However, I can get around this issue by using /wp-admin/setup-config.php. It’s just annoying that env:isntall does not work.

    Interestingly, wp-env works with fine. I think it is just the way the Docker environment for wordpress-develop is configured.

    Thanks for your help. If need be, we can close this thread.

    Thread Starter Brennan Goewert

    (@bgoewert)

    Updated the folder permissions for the entire wordpress-develop directory to 777 and that fixed my issue.

    find wordpress-develop -type d -exec chmod 777 {} \;

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.