passing buildargs to client.build() doesnt work
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.7k
- Avg merge
- 13d 8h
- Merged PRs (30d)
- 2
Description
using a Dockerfile similar to the following:
ARG BASE_IMAGE="3.6"
FROM amd64/python:${BASE_IMAGE}-slim-buster
WORKDIR /app
COPY requirements.txt ./
RUN pip install -r requirements.txt
COPY . .
CMD [ "python3", "-u", "./main.py" ]
When using docker client.build() and passing {'BASE_IMAGE': '3.8'} for buildargs is not working. The image generated is using BASE_IMAGE value 3.6. My expectation is that it would work same as though docker build cli command was used.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided Dockerfile and a Python client.build() call passing {'BASE_IMAGE': '3.8'} as buildargs. Compare the resulting base image with the Docker CLI behavior, then trace how client.build() forwards build arguments. Done means the generated image uses the requested BASE_IMAGE value and a regression test covers the case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, python
- Domain
- api, build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100