Skip to content

Commit 0da8de3

Browse files
committed
Dockerfile: move the default values for images to Dockerfile to fix build checks warnings
move the default values for images to Dockerfile to fix build checks warnings which might come from an empty variable. ``` => WARN: InvalidDefaultArgInFrom: Default value for ARG ${BUILDER_IMAGE} results in empty or inval 0.0s => WARN: InvalidDefaultArgInFrom: Default value for ARG ${BASE_IMAGE_FULL} results in empty or inv 0.0s => WARN: InvalidDefaultArgInFrom: Default value for ARG ${BASE_IMAGE_MINIMAL} results in empty or 0.0s ``` Signed-off-by: Feruzjon Muyassarov <[email protected]> Signed-off-by: Feruzjon Muyassarov <[email protected]>
1 parent 390a440 commit 0da8de3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARG BASE_IMAGE_FULL
33
ARG BASE_IMAGE_MINIMAL
44

55
# Build node feature discovery
6-
FROM ${BUILDER_IMAGE} AS builder
6+
FROM ${BUILDER_IMAGE:-golang} AS builder
77

88
# Get (cache) deps in a separate layer
99
COPY go.mod go.sum /go/node-feature-discovery/
@@ -23,7 +23,7 @@ RUN --mount=type=cache,target=/go/pkg/mod/ \
2323
make install VERSION=$VERSION HOSTMOUNT_PREFIX=$HOSTMOUNT_PREFIX
2424

2525
# Create full variant of the production image
26-
FROM ${BASE_IMAGE_FULL} AS full
26+
FROM ${BASE_IMAGE_FULL:-debian:stable-slim} AS full
2727

2828
# Run as unprivileged user
2929
USER 65534:65534
@@ -35,7 +35,7 @@ COPY deployment/components/worker-config/nfd-worker.conf.example /etc/kubernetes
3535
COPY --from=builder /go/bin/* /usr/bin/
3636

3737
# Create minimal variant of the production image
38-
FROM ${BASE_IMAGE_MINIMAL} AS minimal
38+
FROM ${BASE_IMAGE_MINIMAL:-scratch} AS minimal
3939

4040
# Run as unprivileged user
4141
USER 65534:65534

0 commit comments

Comments
 (0)