我正在使用ubuntu 14.04和Docker版本:
Client:
Version: 17.12.1-ce
API version: 1.35
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:17:56 2018
OS/Arch: linux/amd64
Server:
Engine:
Version: 17.12.1-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.4
Git commit: 7390fc6
Built: Tue Feb 27 22:16:28 2018
OS/Arch: linux/amd64
Experimental: false
以下是我的
Dockerfile
:FROM ubuntu:16.04
# Install the required packages
RUN apt-get update
RUN apt-get -y upgrade
RUN apt-get -y install openvswitch-switch openvswitch-common
RUN apt-get -y install nano
RUN apt-get -y install iproute2
RUN apt-get -y install tcpdump
RUN apt-get -y install openssh-server
RUN apt-get -y install net-tools
RUN apt-get -y install iputils-ping
RUN rm -rf /var/lib/apt/lists/*
之后,我要做的是:
$sudo docker build -t mhkabir/ovs-container:latest .
$sudo docker run -it mhkabir/ovs-container:latest bash
在容器内部,当我尝试检查Open vSwitch时,显示错误:
root@60cf0a5b5cfd:/# ovs-vsctl show
ovs-vsctl: unix:/var/run/openvswitch/db.sock: database connection failed (No such file or directory)
期待您的建议。谢谢。
最佳答案
ovs-vswitchd和ovsdb-server都在运行?
关于linux - 打开vSwitch在Docker上不起作用,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/49415207/