<#20718 Make Pex and Docker integration easy.> Iss...
# github-notifications
c
#20718 Make Pex and Docker integration easy. Issue created by Nishikoh Is your feature request related to a problem? Please describe. This idea is to make Docker and pex integration user-friendly: if we can get the pex target in an ARG and copy it, the user can integrate it while keeping the pex path hidden. Describe the solution you'd like Pex binary path is received as an argument at build time to simplify COPY. The following uses are envisioned.
Copy code
# BUILD
pex_binary(name="hello", entry_point="hello_world.py")
Copy code
# Docker
FROM python:3.12
ARG PEX_BIN=:hello
COPY ${PEX_BIN} /app/hello.pex
Currently, it is necessary to specify the pex path explicitly, as follows.
COPY foo.bar.baz/hello.pex /app/hello.pex
Additional context As the base image target can already be specified, it may be possible to apply it to the pex target.
Copy code
ARG BASE_IMAGE=:base
FROM $BASE_IMAGE
ref: https://www.pantsbuild.org/2.19/docs/docker#dependency-inference-support pantsbuild/pants