Build conntrack as part of the iso.

pull/157/head
dlorenc 2016-06-02 14:04:32 -07:00
parent 5d775b4d8d
commit e241f915e4
4 changed files with 58 additions and 1 deletions

View File

@ -24,6 +24,7 @@ ENV DOCKER_SHA 8824f8a67fbe55d1e52dcbebc74219ba8090006e
ADD nsenter $ROOTFS/usr/bin/
ADD socat $ROOTFS/usr/bin
ADD ethtool $ROOTFS/usr/bin
ADD conntrack $ROOTFS/usr/bin
# Add addons
ADD addon-manager.yaml $ROOTFS/etc/kubernetes/manifests/

View File

@ -0,0 +1,18 @@
# Copyright 2016 The Kubernetes Authors 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.
FROM golang:1.6
RUN apt-get -qq update && apt-get -qq install curl make pkg-config gcc flex bison bzip2
ADD conntrack.sh /go/
RUN /go/conntrack.sh

View File

@ -33,11 +33,16 @@ docker build -t socat -f Dockerfile.socat .
docker run socat cat socat > $tmpdir/socat
chmod +x $tmpdir/socat
# Get ethotool
# Get ethtool
docker build -t ethtool -f Dockerfile.ethtool .
docker run ethtool cat ethtool > $tmpdir/ethtool
chmod +x $tmpdir/ethtool
# Get conntrack
docker build -t conntrack -f Dockerfile.conntrack .
docker run conntrack cat conntrack > $tmpdir/conntrack
chmod +x $tmpdir/conntrack
# Do the build.
docker build -t iso .

33
deploy/iso/conntrack.sh Executable file
View File

@ -0,0 +1,33 @@
#!/bin/bash
# Copyright 2016 The Kubernetes Authors 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.
set -e
PACKAGES="libmnl-1.0.3 libnfnetlink-1.0.1 libnetfilter_cttimeout-1.0.0 libnetfilter_cthelper-1.0.0 libnetfilter_queue-1.0.2 libnetfilter_conntrack-1.0.4"
CONNTRACK=conntrack-tools-1.4.2
fetch() {
curl -s -S http://www.netfilter.org/projects/${1%-*}/files/$1.tar.bz2 | tar xj
}
for PACKAGE in $PACKAGES; do
fetch $PACKAGE
(cd $PACKAGE; ./configure && make LDFLAGS=-static install)
done
fetch $CONNTRACK
(cd $CONNTRACK; ./configure && make LDFLAGS=-static && rm -f src/conntrack && make LDFLAGS=-all-static)
cp $CONNTRACK/src/conntrack /go