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

CLI inconsistency with docker build #7107

Closed
georgmu opened this issue Jul 28, 2020 · 6 comments
Closed

CLI inconsistency with docker build #7107

georgmu opened this issue Jul 28, 2020 · 6 comments
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@georgmu
Copy link

georgmu commented Jul 28, 2020

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind bug

Description

Steps to reproduce the issue:

  1. Use podman as a docker replacement
ln -s /usr/local/bin/docker /usr/bin/podman
  1. Build a new docker container from stdin
echo -e "FROM debian:testing\nRUN /bin/echo 'Test'" | docker build -t debian-test -

Describe the results you received:

With podman as docker replacement, I get the following error:

Error: error reading info about "/var/tmp/buildah510720429/var/tmp/buildah510720429/Dockerfile": stat /var/tmp/buildah510720429/var/tmp/buildah510720429/Dockerfile: no such file or directory

Describe the results you expected:

With docker, the container is built and tagged:

Sending build context to Docker daemon  2.048kB
Step 1/2 : FROM debian:testing
testing: Pulling from library/debian
73b408cb748b: Pull complete 
Digest: sha256:3a901d53cb199478770f3fafd8cdce130b602e3f9c7695516702a39f4ab926ca
Status: Downloaded newer image for debian:testing
 ---> 03c237d6b0a4
Step 2/2 : RUN /bin/echo 'Test'
 ---> Running in 1bf2c746e69d
Test
Removing intermediate container 1bf2c746e69d
 ---> e78872fbeaef
Successfully built e78872fbeaef
Successfully tagged debian-test:latest

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

Version:      2.0.3
API Version:  1
Go Version:   go1.14.3
Built:        Thu Jan  1 01:00:00 1970
OS/Arch:      linux/amd64

Podman works by using podman build ... -f -, but this does not work with docker. Since there are scripts which are primarily targeted at docker (e.g. the travis-ci script in systemd) and use the docker-compatible syntax, I think podman is the right place to align its CLI with docker.

@vrothberg
Copy link
Member

Thanks for opening the issue, @georgmu!

@TomSweeneyRedHat @nalind PTAL

@mheon mheon added Buildah kind/bug Categorizes issue or PR as related to a bug. labels Jul 28, 2020
@TomSweeneyRedHat TomSweeneyRedHat self-assigned this Jul 28, 2020
@rhatdan
Copy link
Member

rhatdan commented Jul 28, 2020

This works:

echo -e "FROM debian:testing\nRUN /bin/echo 'Test'" | buildah bud -t debian-test -

So this looks like a podman bug.

@TomSweeneyRedHat
Copy link
Member

yeah, and it doesn't work if you replace docker with podman in the example above, so more finger pointing at the podman/buildah interaction and not a symlink handling issue.

@rhatdan
Copy link
Member

rhatdan commented Jul 29, 2020

Fixed merged into master branch.

@rhatdan rhatdan closed this as completed Jul 29, 2020
@TomSweeneyRedHat
Copy link
Member

Should this be added to the v2.0 branch too?

@vrothberg
Copy link
Member

#7121 is already marked for backporting

@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 23, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants