-
Notifications
You must be signed in to change notification settings - Fork 711
-
I might have got bash: line 1: cd: {some_dir}: No such file or directory
in some working directory for nerdctl.lima
command.
It executed successfully but got unexpected warning message.
Execute shell in Lima was all expected without warning message.
$ sw_vers ProductName: macOS ProductVersion: 12.2.1 BuildVersion: 21D62 $ uname -m arm64 $ limactl list NAME STATUS SSH ARCH CPUS MEMORY DISK DIR default Running 127.0.0.1:60022 aarch64 4 4GiB 100GiB /Users/jamie/.lima/default
# expetced $ pwd /Users/jamie $ nerdctl.lima ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# with warning $ pwd /Users/jamie/Desktop $ nerdctl.lima ps bash: line 1: cd: /Users/jamie/Desktop: No such file or directory CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# expetced $ pwd /etc $ nerdctl.lima ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
# with warning $ pwd /etc/ppp $ nerdctl.lima ps bash: line 1: cd: /etc/ppp: No such file or directory CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 3 replies
-
I might have got
bash: line 1: cd: {some_dir}: No such file or directory
in some working directory fornerdctl.lima
command. It executed successfully but got unexpected warning message. Execute shell in Lima was all expected without warning message.
This happens when the current working directory in the host is not mapped into the guest.
# with warning $ pwd /Users/jamie/Desktop $ nerdctl.lima ps bash: line 1: cd: /Users/jamie/Desktop: No such file or directory CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
The ~/Desktop
directory is protected on macOS. Make sure you have granted your shell (e.g. Terminal
or iTerm2
) "Full Disk Access".
# expetced $ pwd /etc $ nerdctl.lima ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
This may be "expected" but only works accidentally: The /etc
directory is not mounted inside the guest, but it has its own /etc
directory. You are running the command in the context of that directory, and not the /etc
directory on the host.
# with warning $ pwd /etc/ppp $ nerdctl.lima ps bash: line 1: cd: /etc/ppp: No such file or directory CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
The /etc/ppp
directory only exists on the host but not inside the guest.
Beta Was this translation helpful? Give feedback.
All reactions
-
The
~/Desktop
directory is protected on macOS. Make sure you have granted your shell (e.g.Terminal
oriTerm2
) "Full Disk Access".
On second thoughts, I'm not sure about this: how could this be the current directory if the terminal has not access to it? So there may be a different reason it isn't accessible from inside the guest.
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes, this is my concern.
There is a clue about the bash
is for guest, the host shell is zsh
.
I've done an experiment about limactl shell default
then sudo mkdir /etc/ppp
at guest.
I've executed nerdctl.lima ps
in the host in /etc/ppp
without warning message.
I have some deductions from these observes:
- guest did change directory before execute
nerdctl.lima
. - the warning message only occur when the guest without the directory when host in.
- I think it's a warning message due to
nerdctl.lima
execution always successfully.
Is this an expected behavior?
Beta Was this translation helpful? Give feedback.
All reactions
-
I'd love to fix this. Thanks for your insights @hcmlinj - did you find out what it was?
Beta Was this translation helpful? Give feedback.