cool-easter-32542
03/24/2024, 5:29 PM# BUILD
pex_binary(name="hello", entry_point="hello_world.py")
# 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.
ARG BASE_IMAGE=:base
FROM $BASE_IMAGE
ref: https://www.pantsbuild.org/2.19/docs/docker#dependency-inference-support
pantsbuild/pants