Skip to content

Question: can I -it to the shell of internal Linux host on Mac? #2122

@jameschenjav

Description

@jameschenjav

Hi there,

I am using Rancher Desktop mostly for Docker Desktop alternative for non-linux OSes. One of the containers I am using, requires to chown volume first for data persistance.

$ docker inspect foo
[
    {
        "CreatedAt": "2022-04-18T02:55:20Z",
        "Driver": "local",
        "Labels": {},
        "Mountpoint": "/var/lib/docker/volumes/foo/_data",
        "Name": "foo",
        "Options": {},
        "Scope": "local"
    }
]

So I want to chown directly on the internal host Linux before start the container. On Windows with WSL2, I can wsl -d rancher-desktop to connect to the internal Linux host, and inspect what are available. For example:

~ # df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/sdc                251.0G    540.3M    237.6G   0% /
tmpfs                     3.1G      1.7M      3.1G   0% /mnt/wsl
tools                    59.7G     30.7G     29.0G  51% /init
none                      3.1G         0      3.1G   0% /dev
none                      3.1G    216.0K      3.1G   0% /run
none                      3.1G         0      3.1G   0% /run/lock
none                      3.1G         0      3.1G   0% /run/shm
none                      3.1G         0      3.1G   0% /run/user
tmpfs                     3.1G         0      3.1G   0% /sys/fs/cgroup
drivers                  59.7G     30.7G     29.0G  51% /usr/lib/wsl/drivers
lib                      59.7G     30.7G     29.0G  51% /usr/lib/wsl/lib
C:\134                   59.7G     30.7G     29.0G  51% /mnt/c
/dev/sdd                251.0G     66.8M    238.1G   0% /mnt/wsl/rancher-desktop/run/data
/dev/sdd                251.0G     66.8M    238.1G   0% /etc/rancher
/dev/sdd                251.0G     66.8M    238.1G   0% /var/lib

~ # chown 1234 /var/lib/docker/volumes/foo/_data
~ # ls -la /var/lib/docker/volumes/foo/_data
total 8
drwxr-xr-x    2 1234     0             4096 Apr 18 02:55 .
drwx-----x    3 root     0             4096 Apr 18 02:55 ..

Apart from this, what can I do to inspect/change something on host like /etc/docker/daemon.json, fs.inotify.max_user_watches, etc.?

I tried colima recently, it provides a command colima ssh. Is there any similar thing I can do with Rancher Desktop?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions