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

relative mountpoints when building should use / as default if no WORKDIR is provided #5738

Open
axel7083 opened this issue Sep 16, 2024 · 2 comments

Comments

@axel7083
Copy link

Description

Related to #4309.

While testing the `Dockerfile.cpu on https://github.com/vllm-project/vllm I tried building it, and got the following error

Steps to reproduce the issue:

  1. create a Containerfile
FROM alpine:latest

RUN  --mount=type=bind,src=requirements-build.txt,target=requirements-build.txt \
    cat requirements-build.txt
  1. create a requirements-build.txt
  2. build the image
  3. assert error

We can fix the error by adding WORKDIR / before the RUN.

Describe the results you received:

$: podman build -f Dockerfile.cpu -t vllm-cpu-env --shm-size=4g .
Error: building at STEP "RUN --mount=type=cache,target=/root/.cache/pip --mount=type=bind,src=requirements-build.txt,target=requirements-build.txt pip install --upgrade pip &&     pip install -r requirements-build.txt": resolving mountpoints for container "3a97f46183fa64e10c96f20f9a38a5ed46d2e9e7c4e7bbfbce6fa1adfdacd66e": invalid container path "requirements-build.txt", must be an absolute path

Describe the results you expected:

It should probably use / as default workdir

Output of podman version if reporting a podman build issue:

podman version 5.2.2

Output of uname -a:

Linux fedora.home 6.10.8-200.fc40.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Sep  4 21:41:11 UTC 2024 x86_64 GNU/Linux
Copy link

A friendly reminder that this issue had no activity for 30 days.

@axel7083
Copy link
Author

still valid.

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

No branches or pull requests

1 participant