我正在使用ubuntu 14.04和Docker版本:
def bubbleSort(a):
def swap(x, y):
temp = a[x]
a[x] = a[y]
a[y] = temp
#outer loop
for j in range(len(a)):
#slicing to the center, inner loop, python style
for i in range(j, len(a) - j):
#find the min index and swap
if a[i] < a[j]:
swap(j, i)
#find the max index and swap
if a[i] > a[len(a) - j - 1]:
swap(len(a) - j - 1, i)
return a
以下是我的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/*
在容器内部,当我尝试检查Open vSwitch时,它显示错误:
$sudo docker build -t mhkabir/ovs-container:latest .
$sudo docker run -it mhkabir/ovs-container:latest bash
期待您的建议。谢谢。
答案 0 :(得分:-1)
ovs-vswitchd和ovsdb-server都在运行?