Containerd port mapping from host to container

2k views Asked by At

I am new to containerd and trying to run a simple application with Containerd. I am using ctr to access images, containers and tasks.

In case of a Docker I used to give command as docker run -p 8085:8085 imageId:version

This mapped my host to the container and gave a way for me to expose APIS from container to the host and outside world.

But I am not sure how to do this using ctr in containerd. Also kindly let me know if it is possible or not.

Thanks in advance.

1

There are 1 answers

0
infantus On

You cannot map from container to outside work using the ctr command. Instead, use nerdctl (https://github.com/containerd/nerdctl) as it has the same docker CLI functionality.