forked from openconfig/gnmic
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
20 lines (18 loc) · 788 Bytes
/
Dockerfile
File metadata and controls
20 lines (18 loc) · 788 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# © 2022 Nokia.
#
# This code is a Contribution to the gNMIc project (“Work”) made under the Google Software Grant and Corporate Contributor License Agreement (“CLA”) and governed by the Apache License 2.0.
# No other rights or licenses in or to any of Nokia’s intellectual property are granted for any other purpose.
# This code is provided on an “as is” basis without any warranties of any kind.
#
# SPDX-License-Identifier: Apache-2.0
FROM golang:1.24.7 AS builder
ADD . /build
WORKDIR /build
#RUN CGO_ENABLED=0 go build -ldflags="-s -w" -o gnmic .
RUN CGO_ENABLED=0 go build -o gnmic .
FROM alpine
LABEL org.opencontainers.image.source=https://github.com/openconfig/gnmic
COPY --from=builder /build/gnmic /app/
WORKDIR /app
ENTRYPOINT [ "/app/gnmic" ]
CMD [ "help" ]