From 8d6041e15d89335f52e8d9cd09f534a4d4de129a Mon Sep 17 00:00:00 2001 From: Rajashekhar Gundeti Date: Thu, 24 Aug 2023 13:47:17 +0530 Subject: [PATCH] adding missing Dockerfile --- build/Dockerfile | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 build/Dockerfile diff --git a/build/Dockerfile b/build/Dockerfile new file mode 100644 index 00000000..69e22ba4 --- /dev/null +++ b/build/Dockerfile @@ -0,0 +1,36 @@ +# +# OCI Secrets Store CSI Driver Provider +# +# Copyright (c) 2022 Oracle America, Inc. and its affiliates. +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl/ +# + +FROM golang:1.19 as build + +WORKDIR /provider-src + +# Copy provider sources +COPY go.mod go.sum Makefile ./ +COPY cmd ./cmd +COPY internal ./internal +COPY vendor ./vendor + +# Build provider +RUN make test build + +FROM oraclelinux:7-slim + +LABEL author="OKE Foundations Team" + +COPY --from=build /provider-src/dist/provider /opt/provider/bin/provider + +# copy license files +COPY LICENSE.txt /opt/provider/licenses/LICENSE.txt +COPY THIRD_PARTY_LICENSES.txt /opt/provider/licenses/THIRD_PARTY_LICENSES.txt + +# Note that the provider container should run as root in order to +# mount the Kubernetes hostPath volume and create Unix Domain Socket in that volume. + +WORKDIR /opt/provider + +ENTRYPOINT ["/opt/provider/bin/provider"]