File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15+ # Support FROM override
16+ ARG BUILD_IMAGE=docker.io/golang:1.19
17+ ARG BASE_IMAGE=gcr.io/distroless/static:nonroot
18+
1519# Build the manager binary on golang image
16- FROM docker.io/golang:1.19 as builder
20+ FROM $BUILD_IMAGE as builder
1721WORKDIR /workspace
1822
1923# Run this with docker build --build_arg $(go env GOPROXY) to override the goproxy
@@ -42,7 +46,7 @@ RUN CGO_ENABLED=0 GOOS=linux GOARCH=${ARCH} \
4246 -o manager .
4347
4448# Copy the controller-manager into a thin image
45- FROM gcr.io/distroless/static:nonroot
49+ FROM $BASE_IMAGE
4650WORKDIR /
4751COPY --from=builder /workspace/manager .
4852# Use uid of nonroot user (65532) because kubernetes expects numeric user when applying pod security policies
You can’t perform that action at this time.
0 commit comments