Is it possible to run containers with port forwarding using ctr command?

Viewed 423

I'm currently using containerd to run my application container for testing, but having a problem with networking.

I need to send some requests to port 5000 of my application container though there's no description on ctr manual about running a container with port forwarding.

Using docker, we can do like as follows:

docker run test-image -d -p 5000:5000

Can I do the same thing using ctr command? I know nerdctl can do this but it's hard to use this tool for some reasons within my company.

2 Answers

ctr cannot, but you can download nerdctl and that will do it.

No, ctr is not a comprehensive tool and it does not support all the commands that docker cli used to support.

There is no command in ctr for port forwarding.

Related