Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't read from /var/folders/ from docker #1021

Open
1 of 5 tasks
chlab opened this issue Apr 29, 2024 · 0 comments
Open
1 of 5 tasks

Can't read from /var/folders/ from docker #1021

chlab opened this issue Apr 29, 2024 · 0 comments

Comments

@chlab
Copy link

chlab commented Apr 29, 2024

Description

I'm having trouble reading from a folder under /var/ (on the host) from docker and am suspecting that it might be a colima thing. If not, please let me know.

I am running a local backstage instance and noticed that it can't read the temp files backstage generates to /var/folders/wt/*/T/backstage-*. Unfortunately I don't see where I could change the path where these temp files are stored. So I tried cding into the directory in question and running a little test:

➜  backstage-N4zMz6 ls -l
total 856
drwxrwxr-x@ 14 chle  staff     448 Apr 29 08:05 docs
-rw-r--r--@  1 chle  staff    1281 Apr 24 10:37 mkdocs.yml
-rw-r--r--@  1 chle  staff  425339 Apr 24 10:37 package-lock.json
-rw-r--r--@  1 chle  staff     549 Apr 24 10:37 package.json
-rw-r--r--@  1 chle  staff    2701 Apr 24 10:37 readme.md
drwxr-xr-x@  2 chle  staff      64 Apr 29 08:10 site

(output as expected)

but if I run an ls -l in a docker container, I only see site

➜  backstage-N4zMz6 docker run --rm -w /content -v "/private/var/folders/wt/3z9vk6f57v9d6dqzlkp_xxm00000gn/T/backstage-N4zMz6:/content" ubuntu ls -l
total 4
drwxr-xr-x 2 root root 4096 Apr 29 06:10 site

Why can't I see the other files in the docker container? Can someone point me in the right direction here?

From reading around a bit I made sure that the folder is the filesharingDirectories array in ~/Library/Group\ Containers/group.com.docker/settings.json, but that didn't change anything.

  "filesharingDirectories": [
    "/Users",
    "/Volumes",
    "/private",
    "/tmp",
    "/var/folders",
    "private/var/folders"
  ],

Thanks ❤️

Version

colima version HEAD-9b0809d
git commit: 9b0809d

runtime: docker
arch: aarch64
client: v25.0.4
server: v24.0.9
limactl version 0.21.0
qemu-img version 8.2.1
Copyright (c) 2003-2023 Fabrice Bellard and the QEMU Project developers

Operating System

  • macOS Intel <= 13 (Ventura)
  • macOS Intel >= 14 (Sonoma)
  • Apple Silicon <= 13 (Ventura)
  • Apple Silicon >= 14 (Sonoma)
  • Linux

Output of colima status

INFO[0000] colima is running using macOS Virtualization.Framework
INFO[0000] arch: aarch64
INFO[0000] runtime: docker
INFO[0000] mountType: virtiofs
INFO[0000] socket: unix:///Users/chle/.colima/default/docker.sock

Reproduction Steps

As described, don't know if others can reproduce this

Expected behaviour

I see all the files and folders in the ls -l ran in the docker container

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant