Merge pull request #8729 from liubin/fix/package-kata-monitor

kata-monitor: fix Dockerfile to build image
This commit is contained in:
Tim Zhang 2023-12-26 18:30:15 +08:00 committed by GitHub
commit a4ad12a3d1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,12 +1,12 @@
# Copyright (c) 2020 Eric Ernst # Copyright (c) 2020 Eric Ernst
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
FROM golang:1.15-alpine AS builder FROM golang:1.19-alpine AS builder
RUN apk add --no-cache bash curl git make RUN apk add --no-cache bash curl git make build-base
WORKDIR /go/src/github.com/kata-containers/kata-containers/src/runtime WORKDIR /go/src/github.com/kata-containers/kata-containers/src/runtime
COPY . /go/src/github.com/kata-containers/kata-containers COPY . /go/src/github.com/kata-containers/kata-containers
RUN SKIP_GO_VERSION_CHECK=true make monitor RUN make SKIP_GO_VERSION_CHECK=true monitor
FROM alpine:3.14 FROM alpine:3.14
COPY --from=builder /go/src/github.com/kata-containers/kata-containers/src/runtime/kata-monitor /usr/bin/kata-monitor COPY --from=builder /go/src/github.com/kata-containers/kata-containers/src/runtime/kata-monitor /usr/bin/kata-monitor