From a30c3c0fa3e49d4f8ee34524bdc97860cf301343 Mon Sep 17 00:00:00 2001 From: Doug Hellmann Date: Sun, 27 Sep 2020 08:43:13 -0400 Subject: [PATCH] move Dockerfile to its kubebuilder location Replace build/Dockerfile with a symlink because we still have CI jobs and quay.io configurations using the file from that location. Signed-off-by: Doug Hellmann --- Dockerfile | 15 +++++++++++++++ build/Dockerfile | 16 +--------------- 2 files changed, 16 insertions(+), 15 deletions(-) create mode 100644 Dockerfile mode change 100644 => 120000 build/Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..aa235141ea --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM registry.hub.docker.com/library/golang:1.14 AS builder +WORKDIR /go/src/github.com/metal3-io/baremetal-operator +COPY . . +RUN make build + +# Copy the controller-manager into a thin image +# BMO has a dependency preventing us to use the static one, +# using the base one instead +FROM gcr.io/distroless/base:latest +WORKDIR / +COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/build/_output/bin/baremetal-operator / +USER nobody + +LABEL io.k8s.display-name="Metal3 BareMetal Operator" \ + io.k8s.description="This is the image for the Metal3 BareMetal Operator." diff --git a/build/Dockerfile b/build/Dockerfile deleted file mode 100644 index aa235141ea..0000000000 --- a/build/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM registry.hub.docker.com/library/golang:1.14 AS builder -WORKDIR /go/src/github.com/metal3-io/baremetal-operator -COPY . . -RUN make build - -# Copy the controller-manager into a thin image -# BMO has a dependency preventing us to use the static one, -# using the base one instead -FROM gcr.io/distroless/base:latest -WORKDIR / -COPY --from=builder /go/src/github.com/metal3-io/baremetal-operator/build/_output/bin/baremetal-operator / -USER nobody - -LABEL io.k8s.display-name="Metal3 BareMetal Operator" \ - io.k8s.description="This is the image for the Metal3 BareMetal Operator." diff --git a/build/Dockerfile b/build/Dockerfile new file mode 120000 index 0000000000..395595cf0f --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1 @@ +../Dockerfile \ No newline at end of file