containerd / containerd/nerdctl

portmap:curl connection refused

Open
#1,048 19 comments 0 reactions 0 assignees View on GitHub
bug status/needs-more-information
Dominant language
Go
Stars
10.4k
Forks
826
Avg merge
1d 23h
Merged PRs (30d)
44

Description

### Description

nerdctl run ,localhost:192.168.162.119

sudo nerdctl run -d --name nginx -p 8080:80 nginx:alpine
current machine:
sudo curl http://localhost:8080 ---> work
another machine:
sudo curl http://192.168.162.119:8080 ---> connection refused

sudo nerdctl run -d --name nginx --net host nginx:alpine
current machine:
sudo curl http://localhost:80 ---> work
another machine:
sudo curl http://192.168.162.119:80 ---> work

### Steps to reproduce the issue

1.
2.
3.

### Describe the results you received and expected

when i use "sudo nerdctl -p",the port can't be accessed from another machine

### What version of nerdctl are you using?

0.19,release
cni: 1.1.1

### Are you using a variant of nerdctl? (e.g., Rancher Desktop)

_No response_

### Host information

_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.