-
Notifications
You must be signed in to change notification settings - Fork 2
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
0bae103
commit 4143ddf
Showing
4 changed files
with
25 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,4 @@ | ||
vendor/ | ||
cmd/*/bin/ | ||
|
||
csm-common.mk |
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 |
---|---|---|
@@ -1,12 +1,29 @@ | ||
ARG BASEIMAGE | ||
|
||
# Build the sdk binary | ||
FROM golang:1.21 as builder | ||
|
||
# Set envirment variable | ||
ENV APP_NAME csm-topology | ||
ENV CMD_PATH cmd/topology/main.go | ||
|
||
# Copy application data into image | ||
COPY . /go/src/$APP_NAME | ||
WORKDIR /go/src/$APP_NAME | ||
|
||
# Build the binary | ||
RUN go install github.com/golang/mock/[email protected] | ||
RUN go generate ./... | ||
RUN CGO_ENABLED=0 GOOS=linux go build -o /go/src/service /go/src/$APP_NAME/$CMD_PATH | ||
|
||
# Build the sdk image | ||
FROM $BASEIMAGE as final | ||
LABEL vendor="Dell Inc." \ | ||
name="csm-topology" \ | ||
summary="Dell Container Storage Modules (CSM) for Observability - Topology" \ | ||
summary="Dell Container Storage Modules (CSM) for Observability - Metrics for Topology" \ | ||
description="Provides Kubernetes administrators with the topology data related to containerized storage that is provisioned by CSI (Container Storage Interface) Drivers for Dell storage products" \ | ||
version="2.0.0" \ | ||
license="Apache-2.0" | ||
ARG SERVICE | ||
COPY $SERVICE/bin/service /service | ||
ENTRYPOINT ["/service"] | ||
|
||
COPY --from=builder /go/src/service / | ||
ENTRYPOINT ["/service"] |
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