Skip to content

Commit

Permalink
Merge branch 'master' into release-1.1 for 1.1.4 release
Browse files Browse the repository at this point in the history
  • Loading branch information
dseevr committed Oct 9, 2017
2 parents c210e0a + 9f1c79b commit 6a524e5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 31 deletions.
24 changes: 6 additions & 18 deletions install/v2plugin/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,26 +1,14 @@
##
#Copyright 2017 Cisco Systems Inc. All rights reserved.
#
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#http://www.apache.org/licenses/LICENSE-2.0
#
#Unless required by applicable law or agreed to in writing, software
#distributed under the License is distributed on an "AS IS" BASIS,
#WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
#See the License for the specific language governing permissions and
#limitations under the License.
##

# Docker v2plugin container with OVS / netplugin / netmaster

FROM alpine:3.6
FROM alpine:3.5
LABEL maintainer "Cisco Contiv (https://contiv.github.io)"

RUN mkdir -p /run/docker/plugins /etc/openvswitch /var/log/contiv \
RUN mkdir -p /run/docker/plugins /etc/openvswitch /var/run/contiv/log \
&& echo 'http://dl-cdn.alpinelinux.org/alpine/v3.4/main' >> /etc/apk/repositories \
&& apk --no-cache add openvswitch=2.5.0-r0 iptables ca-certificates openssl curl bash
&& apk --no-cache add openvswitch=2.5.0-r0 iptables ca-certificates openssl curl \
&& wget -q -O /etc/apk/keys/sgerrand.rsa.pub https://raw.githubusercontent.com/andyshinn/alpine-pkg-glibc/master/sgerrand.rsa.pub \
&& wget https://github.com/andyshinn/alpine-pkg-glibc/releases/download/2.23-r1/glibc-2.23-r1.apk \
&& apk --no-cache add glibc-2.23-r1.apk

COPY netplugin netmaster netctl startcontiv.sh /

Expand Down
6 changes: 3 additions & 3 deletions netplugin/netd.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ import (
"log/syslog"
"net/url"
"os"
"os/user"
"strings"
"syscall"
"time"

"github.com/contiv/netplugin/core"
Expand Down Expand Up @@ -181,8 +181,8 @@ func main() {
}

// Make sure we are running as root
uid := syscall.Getuid()
if uid != 0 {
usr, err := user.Current()
if (err != nil) || (usr.Username != "root") {
log.Fatalf("This process can only be run as root")
}

Expand Down
6 changes: 3 additions & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ else
fi

echo $BUILD_VERSION >$VERSION_FILE
GOGC=1500 CGO_ENABLED=0 go install \
-a -installsuffix cgo \

GOGC=1500 go install \
-ldflags "-X $PKG_NAME.version=$BUILD_VERSION \
-X $PKG_NAME.buildTime=$BUILD_TIME \
-X $PKG_NAME.gitCommit=$GIT_COMMIT \
-s -w -d" -pkgdir /tmp/foo-cgo \
-s -w" \
-v $TO_BUILD
15 changes: 8 additions & 7 deletions scripts/netContain/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@
#limitations under the License.
##

# One Container for OVS / netplugin / netmaster
# One Container for OVS / netplugin / netmaster

FROM alpine:3.6
LABEL maintainer "Cisco Contiv (https://contiv.github.io)"
FROM ubuntu:16.04

# Make sure to Modify the Proxy Server values if required
# Make sure to Modify the Proxy Server values if required
# ENV export http_proxy=http://proxy.localhost.com:8080
# ENV export https_proxy=https://proxy.localhost.com:8080

RUN mkdir -p /etc/openvswitch \
&& echo 'http://dl-cdn.alpinelinux.org/alpine/v3.4/main' >> /etc/apk/repositories \
&& apk --no-cache add openvswitch=2.5.0-r0 iptables ca-certificates openssl curl bash
RUN apt-get update \
&& apt-get install -y openvswitch-switch=2.5.2-0ubuntu0.16.04.1 \
net-tools \
iptables \
&& rm -rf /var/lib/apt/lists/*

COPY ./bin /contiv/bin/
COPY ./scripts /contiv/scripts/
Expand Down

0 comments on commit 6a524e5

Please sign in to comment.