-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3d92a2c
commit 16b5bb4
Showing
4 changed files
with
55 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
FROM golang as builder | ||
|
||
COPY . /workspace/ | ||
WORKDIR /workspace/ | ||
RUN make build | ||
|
||
FROM gcr.io/distroless/static-debian12 | ||
COPY --from=builder /workspace/bin/* / | ||
ENTRYPOINT ["/install"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// Copyright (c) Microsoft Corporation. | ||
// Licensed under the MIT license. | ||
package main | ||
|
||
import ( | ||
"fmt" | ||
"os" | ||
) | ||
|
||
func main() { | ||
content, err := os.ReadFile("azure-ipoib-ipam-cni") | ||
if err != nil { | ||
fmt.Printf("failed to find file: %s", err.Error()) | ||
os.Exit(1) | ||
} | ||
if err := os.WriteFile("/opt/cni/bin/azure-ipoib-ipam-cni", content, 0755); err != nil { | ||
fmt.Printf("failed to write file: %s", err.Error()) | ||
os.Exit(1) | ||
} | ||
} |