Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Pex and Docker integration easy. #20718

Open
Nishikoh opened this issue Mar 24, 2024 · 0 comments
Open

Make Pex and Docker integration easy. #20718

Nishikoh opened this issue Mar 24, 2024 · 0 comments

Comments

@Nishikoh
Copy link
Contributor

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.

# 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant