Skip to content

wp-env package: error when starting previously stopped projects (wsl2) #46550

@Shelob9

Description

@Shelob9

Description

I am using wp-env on Windows 10, with wsl2 and Ubuntu-20.04. I can start a project and it works fine. When I run wp-env start on a stopped project I get a Docker error.

Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/34ec5833acc422103f08cf6d54e92ac4931609adcd09f7a99577979325d327df" to rootfs at "/var/www/html": mount /run/desktop/mnt/host/wsl/docker-desktop-bind-mounts/Ubuntu-20.04/34ec5833acc422103f08cf6d54e92ac4931609adcd09f7a99577979325d327df:/var/www/html (via /proc/self/fd/14), flags: 0x5000: no such file or directory: unknown

Step-by-step reproduction instructions

  1. Create new project
  2. Start env
  3. Stop env
  4. npm run env start

Steps to resolve:

  • In Docker Desktop delete all projects with random hashes for names
  • npm run env start

Screenshots, screen recording, code snippet

No response

Environment info

  • Windows 10 with wsl2 and Ubuntu-20.04.
  • Docker Desktop v 4.14.1
  • Node v16.18.1
"devDependencies": {
    "@wordpress/env": "^5.4.0",
    "@wordpress/eslint-plugin": "^13.3.0",
    "@wordpress/scripts": "^24.3.0",
    "npm-run-all": "^4.1.5",
    "parse-gitignore": "^0.5.1"
  },
  "dependencies": {
    "@wordpress/api-fetch": "^6.19.0",
    "@wordpress/blocks": "^11.21.0",
    "@wordpress/components": "^22.1.0",
    "@wordpress/data": "^7.6.0",
    "@wordpress/dom-ready": "^3.22.0",
    "@wordpress/edit-post": "^6.19.0",
    "@wordpress/icons": "^9.13.0",
    "@wordpress/plugins": "^4.20.0",
    "archiver": "^5.3.1"
  }

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs TestingNeeds further testing to be confirmed.[Status] Needs More InfoFollow-up required in order to be actionable.[Tool] Env/packages/env

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions