benclmnt / til

Today I Learned: mainly configs, gotchas, setups, workflows
1 stars 0 forks source link

Running a stateful container using colima #3

Open benclmnt opened 1 year ago

benclmnt commented 1 year ago

As of 19 July 2023, there is a limitation if you want to mount a writable folder into a container volume.

As mentioned here, you should add the following into your /Users/<username>/.lima/_config/override.yaml:

mountType: 9p
mounts:
  - location: "/Users/<username>"
    writable: true
    9p:
      securityModel: mapped-xattr
      cache: mmap
  - location: "~"
    writable: true
    9p:
      securityModel: mapped-xattr
      cache: mmap
  - location: /tmp/colima
    writable: true
    9p:
      securityModel: mapped-xattr
      cache: mmap

and restart colima: colima delete && colima start.

benclmnt commented 1 year ago

Edit docker daemon configurations, e.g. adding insecure registries: https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#how-to-customize-docker-config-eg-add-insecure-registries