ERROR: failed to solve: cannot replace to directory /var/lib/docker/overlay2/mzvoi1qnj4g1jtdkn7hsk6eg5/merged/bin with file

Hi,
I have playing with docker with the new incus vm recently, I’m using dir storage and everything looks fine until that error occurs. Host kernel 6.6.0 and the vm kernel is 6.2.0.

localadmin@D0051:~$ incus config show passcore --expanded
architecture: x86_64
config:
  image.architecture: amd64
  image.description: Ubuntu lunar amd64 (20240111_07:42)
  image.os: Ubuntu
  image.release: lunar
  image.serial: "20240111_07:42"
  image.type: disk-kvm.img
  image.variant: cloud
  volatile.base_image: e4d4d802b464550985586a7ccecfdc0a4fd4cc5405e94e7251d04231b1b7ba61
  volatile.cloud-init.instance-id: bac5b253-d849-4aa1-89ee-a66190402db3
  volatile.eth0.host_name: tapb362c934
  volatile.eth0.hwaddr: 00:16:3e:01:04:27
  volatile.last_state.power: RUNNING
  volatile.last_state.ready: "false"
  volatile.uuid: d2a0d268-8f4c-4104-ada6-ebc05d06d625
  volatile.uuid.generation: d2a0d268-8f4c-4104-ada6-ebc05d06d625
  volatile.vsock_id: "2981283322"
devices:
  eth0:
    name: eth0
    network: incusbr0
    type: nic
  root:
    path: /
    pool: default
    type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""
ubuntu@passcore:/etc/docker$ docker system info | grep -i overlay
 Storage Driver: overlay2
  Native Overlay Diff: true
  Network: bridge host ipvlan macvlan null overlay

Any help will be appreciated.
Regards.

Try setting:

security.syscalls.intercept.mknod: "true"
security.syscalls.intercept.setxattr: "true"

On your instance and then restart it. Those two options help Docker with overlay2 to create whiteout files.

Thanks @stgraber for the answer but I tried on the vm not container, are those parameters for containers, right?
I would be grateful for your advice.
Regards.

Oh, yeah, indeed they are.

VMs don’t need any such tricks, it should basically just work like on any Linux system.

Humm, may be i need more investigation, thanks. :+1: