简体   繁体   中英

docker-compose pull Error: "error creating temporary lease: read-only file system"

I'm trying to run docker-compose pull but I get some errors that I don't know what to do with.

My docker-compose.yaml file:

version: '3'
services:
  strapi:
    image: strapi/strapi
    environment:
      DATABASE_CLIENT: postgres
      DATABASE_NAME: strapi
      DATABASE_HOST: postgres
      DATABASE_PORT: 5432
      DATABASE_USERNAME: strapi
      DATABASE_PASSWORD: strapi
    volumes:
      - ./app:/srv/app
    ports:
      - '1337:1337'
    depends_on:
      - postgres

  postgres:
    image: postgres
    environment:
      POSTGRES_DB: strapi
      POSTGRES_USER: strapi
      POSTGRES_PASSWORD: strapi
    volumes:
      - ./data:/var/lib/postgresql/data

The error message:

Pulling postgres ... error
Pulling strapi   ... error

ERROR: for strapi  error creating temporary lease: write /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: read-only file system: unknown

ERROR: for postgres  error creating temporary lease: write /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: read-only file system: unknown
ERROR: error creating temporary lease: write /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: read-only file system: unknown
error creating temporary lease: write /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: read-only file system: unknown

I tried a multitude of things so YMMV, but here are all of the steps I did that ultimately got it working.

I am using Windows 10 with WSL2 backend on Ubuntu , so again YMMV as I see MacOS is tagged. This is one of the few questions I see related to mine, so I thought it would be valuable.

Steps for success:

  • Update WSL ( wsl --update -- unrelated to the GitHub issue below)

  • stop Docker Desktop

  • stop WSL ( wsl --shutdown )

  • unregister the docker-desktop distro (which contains binaries, but no data)

    • wsl --unregister docker-desktop
  • restart Docker Desktop

  • Enable use of docker compose V2 ( settings -> general -> Use Docker Compose V2 )

Associated GitHub issue link

Extra Info:

I ended up using V2 of docker compose when it worked... it works either way now that the image has pulled properly, though.

I unsuccessfully restarted, reinstalled, and factory reset Docker Desktop many times.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM