Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/docker/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Networking 如何禁用docker容器的internet访问_Networking_Docker_Sandbox_Ubuntu 15.04 - Fatal编程技术网

Networking 如何禁用docker容器的internet访问

Networking 如何禁用docker容器的internet访问,networking,docker,sandbox,ubuntu-15.04,Networking,Docker,Sandbox,Ubuntu 15.04,我试图在docker容器中运行不受信任的代码,并禁止它访问internet iptables: No chain/target/match by that name. 我已经尝试了iptables-I DOCKER-I docker0-j DROP iptables: No chain/target/match by that name. lsb_发布结果-a iptables: No chain/target/match by that name. No LSB modules are

我试图在docker容器中运行不受信任的代码,并禁止它访问internet

iptables: No chain/target/match by that name.
我已经尝试了
iptables-I DOCKER-I docker0-j DROP

iptables: No chain/target/match by that name.
lsb_发布结果-a

iptables: No chain/target/match by that name.
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 15.04
Release:    15.04
Codename:   vivid
docker图像的结果

iptables: No chain/target/match by that name.
REPOSITORY                 TAG                 IMAGE ID            CREATED              VIRTUAL SIZE
virtual_machine            latest              5f2b8cea6752        3 months ago         2.795 GB
chug/ubuntu14.04x64        latest              81b68b976893        2.087208 years ago   224.7 MB

查找项目以供参考

您已经尝试了什么?@JFMeier我已经尝试了
iptables-I DOCKER-I docker0-j DROP
。它给了我
iptables:没有链/目标/匹配名。
iptables: No chain/target/match by that name.