Skip to content

Add instructions about installing pants in docker#22943

Open
nrontsis wants to merge 5 commits intopantsbuild:mainfrom
nrontsis:add-instructions
Open

Add instructions about installing pants in docker#22943
nrontsis wants to merge 5 commits intopantsbuild:mainfrom
nrontsis:add-instructions

Conversation

@nrontsis
Copy link
Copy Markdown

Add some instruction on installing pants in docker and airtight environments as per #22942 (comment)

@sureshjoshi
Copy link
Copy Markdown
Member

Hey @nrontsis - just to clarify here, I know you use uv a lot, but this workflow would work for those who use a python3.11-slim and then just pip install too, right?

Or would that lead to any hiccups?

@nrontsis
Copy link
Copy Markdown
Author

nrontsis commented Dec 23, 2025

Hey @sureshjoshi

this workflow would work for those who use a python3.11-slim and then just pip install too, right?

yes, the following works

FROM python:3.11-slim
ENV NO_SCIE_WARNING=True
ENV PANTS_VERSION=2.30.0
RUN pip install https://github.com/pantsbuild/pants/releases/download/release_${PANTS_VERSION}/pantsbuild_pants-${PANTS_VERSION}-cp311-cp311-manylinux2014_x86_64.whl

but it assumes that the user's docker image comes with python 3.11 (cause pants only publishes wheels for python 3.11), and that the user is happy to mutate the global python env. Otherwise the user will need to install manually python 3.11 (perhaps in conjuction with another python version they need for their app), a pip on that python and perhaps a virtualenv.

My intention was to avoid these assumptions and to provide an example Dockerfile that can work for a wide range of base images.

@sureshjoshi sureshjoshi self-requested a review January 12, 2026 00:18
@sureshjoshi
Copy link
Copy Markdown
Member

Lost this as I wasn't marked as a reviewer.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants