Skip to content

What is the plan with binary dependencies to tar (and nsenter)? #3307

@apostasie

Description

@apostasie

Description

I was wondering why we shell out to the tar binary instead of using golang archive/tar.

Looking at our code, I assume it is because of rootless/nsenter. Is this correct? Are there other reasons?

On the question of nsenter. This comment here:
https://github.com/containerd/nerdctl/blob/main/pkg/rootlessutil/parent_linux.go#L92
suggests removing the dependency on the nsenter binary. The comment does not say if it is only in the context of parent.go, or generally in our codebase.

From what I know, there does not seem to be a pure golang replacement for nsenter (kube does shell out as well right?).
runc has a CGO one though, but I am pretty sure we do not want to drag in CGO in here.

So, questions are:
a. do we want to replace the dependency on binary nsenter? if so, is there a plan / pointers for that?
b. do we want to replace the dependency on the tar binary? ditto

Thanks in advance :).

Steps to reproduce the issue

No response

Describe the results you received and expected

na

What version of nerdctl are you using?

na

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions