docker - FIWARE Lab - Docker 图像连接问题构建图像
问题描述
尝试在 FIWARE Lab 机器上安装一些 GE,安装未使用 Centos 基础映像完成。
我在本地虚拟机上尝试了相同的过程,并且可以成功安装 docker 容器。
尝试使用 docker 说明安装 FIWARE PEP 代理(构建映像): https ://github.com/ging/fiware-pep-proxy/tree/master/extras/docker
sudo docker build -t pep-proxy-image .
Sending build context to Docker daemon 6.656 kB
Step 1/7 : FROM ubuntu:14.04
---> 578c3e61a98c
Step 2/7 : MAINTAINER FIWARE Wilma PEP Proxy Team. DIT-UPM
---> Using cache
---> 79f4c3dbc65b
Step 3/7 : WORKDIR /opt
---> Using cache
---> e705b36ae1f3
Step 4/7 : RUN sudo apt-get update && sudo apt-get install make g++ software-properties-common python-software-properties -y && sudo add-apt-repository ppa:chris-lea/node.js -y && sudo apt-get update && sudo apt-get install nodejs git -y
---> Running in 7ee6f4ca98fa
Ign http://archive.ubuntu.com trusty InRelease
Ign http://security.ubuntu.com trusty-security InRelease
Ign http://archive.ubuntu.com trusty-updates InRelease
Get:1 http://security.ubuntu.com trusty-security Release.gpg [916 B]
Ign http://security.ubuntu.com trusty-security Release
Ign http://archive.ubuntu.com trusty-backports InRelease
Get:2 http://archive.ubuntu.com trusty Release.gpg [933 B]
Get:3 http://archive.ubuntu.com trusty-updates Release.gpg [916 B]
Get:4 http://archive.ubuntu.com trusty-backports Release.gpg [916 B]
Ign http://archive.ubuntu.com trusty Release
Ign http://archive.ubuntu.com trusty-updates Release
Ign http://archive.ubuntu.com trusty-backports Release
我在主机上有完整的连接,并且我在开放堆栈(如 Web 仪表板)上打开了安全规则。我也禁用了 Centos 防火墙
systemctl disable firewalld
如果我下载图像没有问题,但我无法在 FIWARE Lab 上构建 提前致谢
解决方案
我认为这是 MTU 的问题。VM 的 MTU 为 1400,docker 默认的 MTU 为 1500,因此它们不起作用。
因此,考虑到描述的安装https://docs.docker.com/install/linux/docker-ce/centos/并基于此处描述的默认网络自定义:https ://docs.docker.com/v17.09/引擎/用户指南/网络/default_network/custom-docker0/
我们可以配置 docker0 使用此配置创建文件 /etc/docker/daemon.json 以使其与默认配置一样:
{
"bip": "172.17.0.1/16",
"fixed-cidr": "172.17.0.1/16",
"mtu": 1400,
"dns": ["8.8.8.8"]
}
然后重新启动 docker 服务后,一切都应该正常工作。
推荐阅读
- python - 在 SpaCy 上计算文本的平均向量
- javascript - 有没有办法为每 x 量的数据创建一个嵌入页面?
- spring - Spring中的JPA持久化上下文和数据库操作
- powerbi - 如何在 power bi 中添加带有过滤器的列
- python - 如何获得条件适用的次数?
- android-studio - 由于光标从箭头变为手形,因此无法在 Android Studio 资源布局文件中选择/移动属性的位置
- elasticsearch - 如何在同一个仪表板上同时监控指标和日志消息?
- c++ - 如何在界面中同时画圆和线?
- flutter - 使用 400 多个小框优化可缩放网格
- c# - 我在 CustomerCreateOptions 中找到 SourceToken 选项