Skip to content

fix can't start with -it flag#950

Closed
ningmingxiao wants to merge 1 commit into
containerd:mainfrom
ningmingxiao:run_it
Closed

fix can't start with -it flag#950
ningmingxiao wants to merge 1 commit into
containerd:mainfrom
ningmingxiao:run_it

Conversation

@ningmingxiao
Copy link
Copy Markdown
Contributor

Signed-off-by: ningmingxiao ning.mingxiao@zte.com.cn

@ningmingxiao ningmingxiao force-pushed the run_it branch 2 times, most recently from d3bdaa0 to 5dbb7d9 Compare March 29, 2022 02:51
@ningmingxiao
Copy link
Copy Markdown
Contributor Author

fix #492

Signed-off-by: ningmingxiao <ning.mingxiao@zte.com.cn>
@AkihiroSuda
Copy link
Copy Markdown
Member

docker start doesn't support tty

$ docker start --help

Usage:  docker start [OPTIONS] CONTAINER [CONTAINER...]

Start one or more stopped containers

Options:
  -a, --attach               Attach STDOUT/STDERR and forward signals
      --detach-keys string   Override the key sequence for detaching a container
  -i, --interactive          Attach container's STDIN

Comment thread cmd/nerdctl/start.go
return errors.New("got nil con with flagT=true")
}
taskCIO = cio.NewCreator(cio.WithStreams(con, con, nil), cio.WithTerminal)
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency with Docker, we have to detach tty

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what should I do? change from return errors.New("got nil con with flagT=true") to return errors.New("got nil con")?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably you should attach a dummy terminal, not the real terminal, to emulate Docker's behavior.
Needs further investigation.

@AkihiroSuda AkihiroSuda removed this from the v0.19.0 (tentative) milestone Apr 5, 2022
@fahedouch
Copy link
Copy Markdown
Member

fahedouch commented Dec 23, 2022

Fixed by #1642 ?
@ningmingxiao cc

@ningmingxiao
Copy link
Copy Markdown
Contributor Author

Fixed by #1642 ? @ningmingxiao cc
yes

@ningmingxiao ningmingxiao deleted the run_it branch December 19, 2024 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants