33

I am using Windows 10 x64 and just downloaded Docker, I tried running a simple "hello-world" dockerfile but I kept getting an error:

docker: Error response from daemon: error creating temporary lease: file resize error: truncate /var/lib/desktop-containerd/daemon/io.containerd.metadata.v1.bolt/meta.db: read-only file system: unknown.

Every time I try, I get the same file read-only error.

7
  • What OS are you running? Commented Jul 2, 2021 at 0:31
  • windows 10 64 bit @Lukman Commented Jul 2, 2021 at 0:32
  • I only downloaded docker for windows and I dont know what to do from here, it seems like docker is running and I ran powershell as adminstrator and ran docker run hello-world but I keep getting that error Commented Jul 2, 2021 at 0:33
  • Do i have to run anything within the docker desktop app, I currently see no containers running Commented Jul 2, 2021 at 0:37
  • 6
    Post the output of docker info and also check if your drive C: has enough free space (20+ GB). Docker is not complicated. Windows is complicating it. Commented Jul 2, 2021 at 0:50

5 Answers 5

40

If I remember correct after clearing space and Restarting Docker from scratch worked for me.

Sign up to request clarification or add additional context in comments.

1 Comment

Yes, this has something to do with disk space (or lack thereof). Uninstall some stuff.
12

On windows, open Docker desktop and click on the debug icon then restart. You can also consider "reset to factory defaults"

Comments

8

In my case the problem was conflicting mounts in docker compose:

  webserver:
    image: nginx:latest
    ports:
      - 80:80
      - 443:443
    restart: always
    volumes:
      - ./services/nginx/static/:/var/www/:ro
      - ./services/certbot/www:/var/www/certbot/:ro

chaged it to:

  webserver:
    image: nginx:latest
    ports:
      - 80:80
      - 443:443
    restart: always
    volumes:
      - ./services/nginx/static/:/var/www/PUBLIC:ro
      - ./services/certbot/www:/var/www/certbot/:ro

3 Comments

no way to make it work with exactly the first configuration?
For me it was similar. I was mounting /usr/local/share/myfolder, then /usr/local/share/myfolder/demo/index.html, but the demo folder didn't exist inside myfolder. After creating demo inside the folder on the host that was bind-mounted to /usr/local/share/myfolder, it worked.
@DemetryPascal You can make it work with the original configuration by pre-creating the mount target folder on the outside, e.g. ./services/nginx/static/certbot in this case.
2

My case the reason is a corrupted SSD. When you see the error, check dmesg. Mine is brutal:

[ 5395.061163] blk_update_request: I/O error, dev sdb, sector 18906376 op 0x0:(READ) flags 0x0 phys_seg 1 prio class 0
[ 5395.061166] Buffer I/O error on dev sdb2, logical block 2363041, async page read
[ 5395.061310] Aborting journal on device sdb2-8.
[ 5395.061315] EXT4-fs error (device sdb2) in ext4_reserve_inode_write:6000: Journal has aborted
[ 5395.065827] EXT4-fs error (device sdb2): ext4_journal_check_start:61: Detected aborted journal
[ 5395.065829] EXT4-fs (sdb2): Remounting filesystem read-only
[ 5395.067419] EXT4-fs error (device sdb2): ext4_journal_check_start:61: Detected aborted journal
[ 5395.067421] EXT4-fs error (device sdb2): mpage_map_and_submit_extent:2619: comm postgres: Failed to mark inode 2385447 dirty
[ 5395.067422] EXT4-fs (sdb2): ext4_writepages: jbd2_start: 9223372036854775803 pages, ino 14362621; err -30
[ 5395.202060] EXT4-fs error (device sdb2): ext4_journal_check_start:61: Detected aborted journal

Comments

1

Go to "Docker Desktop"-> "Settings" Go to "Resources"->"File Sharing" Add your project folder

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.