nerdctl icon indicating copy to clipboard operation
nerdctl copied to clipboard

compose: have an option to resolve `~` into the host home directory of Lima / Rancher Desktop

Open AkihiroSuda opened this issue 3 years ago • 1 comments

What is the problem you're trying to solve

nerdctl compose up via Lima or Rancher Desktop resolves ~ in the compose YAML into the guest home (/home/foo.linux or /root), not into the host home (/Users/foo).

This is not a bug but confusing.

Describe the solution you'd like

Support a new property like home = $LIMA_USERHOME in nerdctl.toml: https://github.com/containerd/nerdctl/blob/master/docs/config.md

Probably this can be applied to expansion of ~/.docker/config.json too.

Additional context

No response

AkihiroSuda avatar Apr 20 '22 05:04 AkihiroSuda

cc @jandubois @mattfarina

AkihiroSuda avatar Apr 20 '22 05:04 AkihiroSuda

$HOME also resolves to the guest home instead of host home.

This is a difference in behavior from Docker, which makes same composer file behave differently.

Here is a snippet to consider:

secrets:
  ssh_key:
    file: "$HOME/.ssh/id_ed25519"

instead of /Users/myuser/.ssh/id_ed25519 I get /root/.ssh/ided25519

brodock avatar Oct 19 '22 14:10 brodock

Can confirm this is still an issue

rsampaths16 avatar May 25 '23 11:05 rsampaths16