Skip to content

Instantly share code, notes, and snippets.

@ewhauser
Created July 14, 2022 20:15
Show Gist options
  • Save ewhauser/46cf5282ac940eaeb31688f6d90a8775 to your computer and use it in GitHub Desktop.
Save ewhauser/46cf5282ac940eaeb31688f6d90a8775 to your computer and use it in GitHub Desktop.
pkg_tar(
name = "interpreter",
srcs = [
"@python3_9//:files",
],
mode = "0644",
package_dir = "/usr/local/python",
strip_prefix = ".",
)
container_image(
name = "python_base_image",
base = "@distroless//base",
tags = [":interpreter"],
visibility = ["//visibility:public"],
)
py3_image(
name = "my_app_image",
srcs = [":my_app"],
base = ":python_image",
imports = ["."],
main = "//python/my_app:__main__.py",
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment