Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Add configurable entrypoint to py3_image #2242

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python3/image.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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,
Expand Down