From bc120289ec9e838099e96ae2cc078e90bcc8630f Mon Sep 17 00:00:00 2001 From: Wainer dos Santos Moschetta Date: Fri, 19 Nov 2021 14:30:23 -0500 Subject: [PATCH] packaging: delint kata-monitor dockerfiles Removed all errors/warnings pointed out by hadolint version 2.7.0, except for the following ignored rules: - "DL3008 warning: Pin versions in apt get install" - "DL3041 warning: Specify version with `dnf install -y -`" - "DL3033 warning: Specify version with `yum install -y -`" - "DL3048 style: Invalid label key" - "DL3003 warning: Use WORKDIR to switch to a directory" - "DL3018 warning: Pin versions in apk add. Instead of apk add use apk add =" - "DL3037 warning: Specify version with zypper install -y [=]" Fixes #3107 Signed-off-by: Wainer dos Santos Moschetta --- tools/packaging/kata-monitor/Dockerfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/packaging/kata-monitor/Dockerfile b/tools/packaging/kata-monitor/Dockerfile index 425f455722..9b964891f9 100644 --- a/tools/packaging/kata-monitor/Dockerfile +++ b/tools/packaging/kata-monitor/Dockerfile @@ -1,13 +1,13 @@ # SPDX-License-Identifier: Apache-2.0 -FROM golang:1.15-alpine +FROM golang:1.15-alpine AS builder -RUN apk add bash curl git make +RUN apk add --no-cache bash curl git make WORKDIR /go/src/github.com/kata-containers/kata-containers/src/runtime COPY . /go/src/github.com/kata-containers/kata-containers RUN SKIP_GO_VERSION_CHECK=true make monitor -FROM alpine:latest -COPY --from=0 /go/src/github.com/kata-containers/kata-containers/src/runtime/kata-monitor /usr/bin/kata-monitor +FROM alpine:3.14 +COPY --from=builder /go/src/github.com/kata-containers/kata-containers/src/runtime/kata-monitor /usr/bin/kata-monitor CMD ["-h"] ENTRYPOINT ["/usr/bin/kata-monitor"]