From 794ec77962ffd3b2900856b695fc5f53f66633e5 Mon Sep 17 00:00:00 2001 From: Dennis Bruggner Date: Mon, 3 Apr 2023 11:33:49 +0200 Subject: [PATCH] Add configurable entrypoint to py3_image This makes entrypoint for py3_image configurable so that a user can provide path to a hermetic python environment. --- python3/image.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python3/image.bzl b/python3/image.bzl index 9b4f12816..28a652d7a 100644 --- a/python3/image.bzl +++ b/python3/image.bzl @@ -73,7 +73,7 @@ DEFAULT_BASE = select({ "//conditions:default": "@py3_image_base//image", }) -def py3_image(name, base = None, deps = [], layers = [], env = {}, **kwargs): +def py3_image(name, base = None, deps = [], layers = [], env = {}, entrypoint = ["/usr/bin/python"], **kwargs): """Constructs a container image wrapping a py_binary target. Args: @@ -113,7 +113,7 @@ def py3_image(name, base = None, deps = [], layers = [], env = {}, **kwargs): app_layer( name = name, base = base, - entrypoint = ["/usr/bin/python"], + entrypoint = entrypoint, env = env, binary = binary_name, visibility = visibility,