Skip to content

Broken docker build command in Makefile #7

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

Closed
elevran opened this issue Apr 17, 2025 · 2 comments · Fixed by #21
Closed

Broken docker build command in Makefile #7

elevran opened this issue Apr 17, 2025 · 2 comments · Fixed by #21
Assignees
Labels
bug Something isn't working

Comments

@elevran
Copy link
Collaborator

elevran commented Apr 17, 2025

What happened:

$ make image-local-build
BUILDER=beautiful_jang
make image-build PUSH=
make[1]: Entering directory '/home/elevran/work/go/src/github.com/neuralmagic/gateway-api-inference-extension'
✔ Loaded DEV_VERSION from .version.json: 0.0.3
✔ Loaded PROD_VERSION from .version.json: 0.0.3
✔ Loaded IMAGE_TAG_BASE from .version.json: quay.io/vllm-d/gateway-api-inference-extension-dev
🛠 Final values: DEV_VERSION=0.0.3, PROD_VERSION=0.0.3, IMAGE_TAG_BASE=quay.io/vllm-d/gateway-api-inference-extension-dev
==== Building Docker image quay.io/vllm-d/gateway-api-inference-extension:0.0.1 ====
docker podman build --build-arg TARGETOS= --build-arg TARGETARCH= -t quay.io/vllm-d/gateway-api-inference-extension:0.0.1 .
unknown flag: --build-arg

Usage:  docker [OPTIONS] COMMAND [ARG...]

Run 'docker --help' for more information
make[1]: *** [Makefile:479: image-build] Error 125

What you expected to happen:
container image builds correctly

How to reproduce it (as minimally and precisely as possible):
Building in Linux VM, only docker is installed. Run make image-local-build

Anything else we need to know?:
Makefile seems to pick up the wrong value for CONTAINER_TOOL. It is set to docker podman ... as can be seen in the output above.

Commenting out line 400 fixes the issue and allows the build to complete:
#CONTAINER_TOOL := $(shell command -v docker >/dev/null 2>&1 && echo docker || command -v podman >/dev/null 2>&1 && echo podman || echo "")

Environment:

  • Kubernetes version (use kubectl version): NA
  • Inference extension version (use git describe --tags --dirty --always): latest dev branch
  • Cloud provider or hardware configuration: NA
  • Install tools: docker, KIND, etc,
  • Others: NA
@elevran
Copy link
Collaborator Author

elevran commented Apr 17, 2025

@clubanderson

  1. the way it is set up in line 400 (using := instead of ?=) prevents CONTAINER_TOOL from being overridden outside the Makefile for local builds.
  2. I think the short circuiting logic is wrong:
    $ command -v docker >/dev/null 2>&1 && echo docker
    docker
    $ command -v podman >/dev/null 2>&1 && echo podman
    $ # there is no podman installed!
    $ command -v docker >/dev/null 2>&1 && echo docker || command -v podman >/dev/null 2>&1 && echo podman || echo ""
    docker
    podman
    $ # but both values are printed...

It would be worthwhile to see if similar constructs are in other makefiles

elevran added a commit to elevran/gateway-api-inference-extension that referenced this issue Apr 17, 2025
- CONTAINER_TOOL setting commented out until can be fixed correctly (Ref neuralmagic#7)
- image name was missing `epp` as last element in tag

Signed-off-by: Etai Lev Ran <elevran@gmail.com>
@shaneutt shaneutt added the bug Something isn't working label Apr 17, 2025
@shaneutt shaneutt linked a pull request Apr 18, 2025 that will close this issue
@shaneutt
Copy link
Collaborator

#21 solve this for now. Follow ups for this are now covered by #28.

mayabar pushed a commit that referenced this issue Apr 23, 2025
- CONTAINER_TOOL setting commented out until can be fixed correctly (Ref #7)
- image name was missing `epp` as last element in tag

Signed-off-by: Etai Lev Ran <elevran@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants