containerd / containerd/nerdctl

Fix `flag -t needs -i to be specified together` restriction in compose run

Open
#1,604 2 comments 0 reactions 0 assignees View on GitHub
area/compose kind/feature
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### What is the problem you're trying to solve

Previously `-i` and `-t` cannot be specified together in `nerdctl exec/run`, which was fixed in https://github.com/containerd/nerdctl/commit/18ea81f8f7cb6949b4748349b2782aad19e4d484. We should be able to remove the restriction in `nerdctl compose run` as well.

This can be a good first issue.

### Describe the solution you'd like

`nerdctl compose run` can use `-i, -t` independently. Some places to look into:

https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/run.go#L101 (update `-t` usage document)

https://github.com/containerd/nerdctl/blob/main/cmd/nerdctl/compose_run.go#L119 (update `-t` usage and use the cli value)

https://github.com/containerd/nerdctl/blob/main/pkg/composer/run.go (make sure `-i`, `-t` are used correctly)

https://github.com/containerd/nerdctl/blob/main/pkg/composer/up_service.go#L160 (remove the restriction)

Also add integration test for `compose run` similar to the tests in the above commit.

### Additional context

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.