Skip to content

Commit bedbb73

Browse files
authored
Merge pull request #2302 from Nordix/build-checks
Move the default values for images to Dockerfile to fix InvalidDefaultArgInFrom warnings
2 parents 9a8a5b2 + 0da8de3 commit bedbb73

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)