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

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.



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mayank Upasak