-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"podman build -f Dockerfile build-root" is broken when using podman-remote #13293
Comments
This could be due to the relative build path changes we made right before 4.0 I will look at this. |
I think I'm seeing something very similar to this using podman-3.4.4-1.fc35.x86_64.
It looks like it's reading the Dockerfile from the cwd of the server here, not the file passed in via stdin on the client.
I worked around this issue using this systemd dropin:
|
Thanks @gbritton I will look at both of these issues today. |
@baude is this how context dirs are supposed to work? I thought |
yeah I think, looking at the code the local context dir gets ignored since we |
podman build fails on remote build when using a relative context directory. This is because the context dir was not being added to the tar, so when remote the compat build function would not be able to stat the contextDir. resolves containers#13293 Signed-off-by: cdoern <[email protected]>
podman build fails on remote build when using a relative context directory. This is because the context dir was not being added to the tar, so when remote the compat build function would not be able to stat the contextDir. resolves containers#13293 Signed-off-by: cdoern <[email protected]>
This issue still seems present in 4.4.4 Local: podman build -f ./Dockerfile context
STEP 1/2: FROM docker.io/debian:bullseye
STEP 2/2: COPY test /test
COMMIT
--> 233a1ccae76
233a1ccae76506fa52815f8d8b9e9b04df270168057d7b0d70fd55e3439c1679 Server: $ podman run -p 2375:2375 --rm quay.io/podman/stable podman system service -t 0 tcp://:2375 Client: $ podman --remote --url tcp://localhost:2375 build -f ./Dockerfile context
Error: stat /var/tmp/libpod_builder561937789/build/home/raniz/src/podman-remote-test/Dockerfile: no such file or directory Info:
Here's a script for repeatable reproduction: #!/usr/bin/env bash
target=$(mktemp -d)
mkdir -p ${target}
cat <<EOF >${target}/Containerfile
FROM quay.io/fedora/fedora:latest
COPY test /test
EOF
mkdir -p ${target}/context
touch ${target}/context/test
# Start podman service
podman run --rm -d --name podman-service -p 2375:2375 quay.io/podman/stable:latest podman system service tcp://:2375
# Build
podman run --rm --name podman-remote --network host -v ${target}:/build quay.io/podman/stable:latest podman --remote --url tcp://localhost:2375 build -f /build/Containerfile /build/context
podman rm -f podman-service podman-remote
rm -rf "${target}" |
@cdoern Any thoughts? |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
In unusual scenarios where you specify a specific Dockerfile path using "-f" in parent folder, the build works when using "podman local" but fails with "podman-remote". One would expect that it works with podman-remote too.
Steps to reproduce the issue:
$ podman run --name podman-remote --detach --rm --privileged --user podman -v /run/user/1000/podman quay.io/podman/upstream podman system service -t 0 unix:///run/user/1000/podman/podman.sock
$ podman run -t -i --privileged --rm --volumes-from podman-remote quay.io/podman/upstream
Describe the results you received:
podman build -f Dockerfile build-root
works:Describe the results you expected:
podman build -f Dockerfile build-root
shall work no matter if podman is running locally or remotely.Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)
Yes (this bug report was made using explicitly quay.io/podman/upstream
The text was updated successfully, but these errors were encountered: