Skip to content

Commit

Permalink
Merge pull request kubernetes#2070 from osodevops/fix_2067
Browse files Browse the repository at this point in the history
Fixed Docker build for networking performance issue: kubernetes#2067
  • Loading branch information
k8s-ci-robot committed Jun 23, 2022
2 parents 8e4bfbc + 1104ce2 commit 14d7a3f
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 9 deletions.
12 changes: 11 additions & 1 deletion network/benchmarks/netperf/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@
#
# Args: --mode=worker --host=<service cluster ip> --port=5202
#
ARG GOLANG_VERSION=1.18
FROM golang:${GOLANG_VERSION} as builder
WORKDIR /workspace

COPY nptest/nptest.go nptest.go
COPY go.sum go.sum
COPY go.mod go.mod

RUN go build -o nptests

FROM debian:jessie
ENV LD_LIBRARY_PATH=/usr/local/lib

Expand All @@ -39,6 +49,6 @@ RUN cd iperf-3.1 && ./configure --prefix=/usr/local --bindir /usr/local/bin && m
RUN curl -LO https://github.com/HewlettPackard/netperf/archive/netperf-2.7.0.tar.gz && tar -xzf netperf-2.7.0.tar.gz && mv netperf-netperf-2.7.0/ netperf-2.7.0
RUN cd netperf-2.7.0 && ./configure --prefix=/usr/local --bindir /usr/local/bin && make && make install

COPY nptests /usr/bin/
COPY --from=builder /workspace/nptests /usr/bin/

ENTRYPOINT ["nptests"]
15 changes: 7 additions & 8 deletions network/benchmarks/netperf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,21 @@
# See the License for the specific language governing permissions and
# limitations under the License.

all: docker nptests push launch runtests
all: docker push launch runtests

DOCKERREPO := girishkalele/netperf-latest

docker: nptests launch
mkdir -p Dockerbuild && \
docker: launch
mkdir -p Dockerbuild/nptest && \
cp -f Dockerfile Dockerbuild/ && \
cp -f nptest/nptests Dockerbuild/ &&\
docker build -t $(DOCKERREPO) Dockerbuild/
cp -f nptest/nptest.go Dockerbuild/nptest/ && \
cp -f go.mod Dockerbuild/ && \
cp -f go.sum Dockerbuild/ && \
docker build -t $(DOCKERREPO) Dockerbuild/

push: docker
gcloud docker push $(DOCKERREPO)

nptests: nptest/nptest.go
cd nptest; GOOS=linux GOARCH=amd64 make nptests

clean:
@rm -f Dockerbuild/*
@rm -f ./nptests ./*svg ./*png ./*jpg ./*csv ./*.cap ./*.pyc nptests ./*~
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit 14d7a3f

Please sign in to comment.