bazelbuild / rules_docker

Rules for building and handling Docker images with Bazel
Apache License 2.0
1.07k stars 694 forks source link

feat: support custom python entrypoints #2247

Closed DerekTBrown closed 1 year ago

DerekTBrown commented 1 year ago

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

What is the current behavior?

py3_image always uses /usr/bin/python as an entrypoint, which may or may not be correct for some base images. For instance, many images provide /usr/bin/python3, and don't provide a symlink to /usr/bin/python.

What is the new behavior?

This PR allows a developer to override the entrypoint of a py3_image or a py_image.

Does this PR introduce a breaking change?

Other information

DerekTBrown commented 1 year ago

I just found this related thread:

https://github.com/bazelbuild/rules_docker/issues/1247#issuecomment-551262041