Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix plugin config and NIC prefix #27

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker-sriov-plugin
17 changes: 6 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
FROM golang:1.10.1 as build
FROM golang:1.22.2 as build
WORKDIR /go/src/docker-sriov-plugin

RUN go get github.com/docker/docker/client
RUN go get github.com/docker/docker/api/types

RUN go get github.com/golang/dep/cmd/dep
COPY Gopkg.toml Gopkg.lock ./
RUN dep ensure -v -vendor-only

COPY . .
RUN export CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' && \
go install -ldflags="-s -w" -v docker-sriov-plugin

FROM debian:stretch-slim
FROM debian:bookworm-slim
ARG PLUGIN_ARGS=
COPY --from=build /go/bin/docker-sriov-plugin /bin/docker-sriov-plugin
COPY ibdev2netdev /tmp/tools/

CMD ["/bin/docker-sriov-plugin"]
RUN echo "$PLUGIN_ARGS" > /tmp/plugin_args
COPY run_docker_sriov_plugin /bin
CMD ["/bin/run_docker_sriov_plugin"]
7 changes: 7 additions & 0 deletions Dockerfile-dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM debian:bookworm-slim
ARG PLUGIN_ARGS
COPY docker-sriov-plugin /bin/
COPY ibdev2netdev /tmp/tools/
RUN echo "--debug $PLUGIN_ARGS" > /tmp/plugin_args
COPY run_docker_sriov_plugin /bin
CMD ["/bin/run_docker_sriov_plugin"]
132 changes: 0 additions & 132 deletions Gopkg.lock

This file was deleted.

29 changes: 0 additions & 29 deletions Gopkg.toml

This file was deleted.

10 changes: 6 additions & 4 deletions build
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ function execute_cmd()
{
case "$input_cmd" in
"make")
echo "Building image: $ARCH_IMAGE"
docker build . --force-rm -t $ARCH_IMAGE
echo "Building image: $ARCH_IMAGE"
set -x
docker build . --force-rm -t $ARCH_IMAGE $@
;;
"push")
echo "Pushing images"
Expand Down Expand Up @@ -80,7 +81,8 @@ validate_input_cmd $1
if [ $# -lt 1 ]; then
input_cmd=make
else
input_cmd=$1
input_cmd=$1
shift
fi

execute_cmd
execute_cmd $@
6 changes: 6 additions & 0 deletions build_dev
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

CGO_LDFLAGS_ALLOW='-Wl,--unresolved-symbols=ignore-in-object-files' \
go build -ldflags="-s -w" -v docker-sriov-plugin || exit 1

exec docker build --progress plain --force-rm -t rdma/sriov-plugin:dev -f Dockerfile-dev .
2 changes: 1 addition & 1 deletion driver/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (

func getRightClientApiVersion() (string, error) {
// Start with the lowest API to query which version is supported.
lowestCli, err3 := client.NewClientWithOpts(client.FromEnv, client.WithVersion("1.12"))
lowestCli, err3 := client.NewClientWithOpts(client.FromEnv, client.WithVersion("1.24"))
if err3 != nil {
fmt.Println("Fail to create client: ", err3)
return "", err3
Expand Down
Loading