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

"podman build": If you put tag option after context, no REPO or TAG is assigned #2811

Closed
rpjday opened this issue Mar 30, 2019 · 3 comments
Closed
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.

Comments

@rpjday
Copy link
Contributor

rpjday commented Mar 30, 2019

Yes, I realize my fingers got ahead of me when I used this Dockerfile:

FROM fedora:28
RUN dnf -y install cowsay

and built an image using "podman build" but accidentally put the "--tag" option after the context:

$ podman build . --tag rdayp

it showed up under "podman images" with no repo or tag values (top line):

REPOSITORY                      TAG      IMAGE ID       CREATED          SIZE
<none>                          <none>   51925a656680   18 seconds ago   529 MB
docker.io/library/fedora        28       4c5b21baa7a0   2 months ago     270 MB
docker.io/library/hello-world   latest   fce289e99eb9   2 months ago     6.14 kB

There was no diagnostic printed, it just did the build, claimed success and gave me "none" in both the REPOSITORY and TAG fields. Does this merit at least a warning? It took me a few seconds to realize how I had messed up.

@mheon
Copy link
Member

mheon commented Mar 30, 2019

Is this 1.1.2? I believe we've fixed this on master

@TomSweeneyRedHat
Copy link
Member

Definitely should be giving you a syntax error, like @mheon noted, thought this was fixed already.

@rpjday
Copy link
Contributor Author

rpjday commented Mar 30, 2019

Crap, sorry, yes, it's 1.1.2. Will close if it's been fixed. Will also make more of an effort to check the master branch for stuff like this.

@rpjday rpjday closed this as completed Mar 30, 2019
wking added a commit to wking/kubebuilder that referenced this issue Nov 11, 2020
Because folks may have 'docker' aliased to 'podman', and Podman
prefers options before positional arguments [1]:

  $ podman build --help | grep CONTEXT-DIRECTORY
     podman build [command options] CONTEXT-DIRECTORY | URL

Generated with:

  $ sed -i 's/ . -t \([^ ]*\)/build -t \1 ./' $(git grep -l 'docker.*build.* \. ')

[1]: containers/podman#2811
wking added a commit to wking/kubebuilder that referenced this issue Nov 11, 2020
Because folks may have 'docker' aliased to 'podman', and Podman
prefers options before positional arguments [1]:

  $ podman build --help | grep CONTEXT-DIRECTORY
     podman build [command options] CONTEXT-DIRECTORY | URL

Generated with:

  $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ')

[1]: containers/podman#2811
wking added a commit to wking/kubebuilder that referenced this issue Nov 16, 2020
Because folks may have 'docker' aliased to 'podman', and Podman
prefers options before positional arguments [1]:

  $ podman build --help | grep CONTEXT-DIRECTORY
     podman build [command options] CONTEXT-DIRECTORY | URL

Generated with:

  $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ')
  $ git checkout HEAD -- docs/kubebuilder_v0_v1_difference.md

The docs checkout leaves historical docs alone [2].

[1]: containers/podman#2811
[2]: kubernetes-sigs#1817 (comment)
wking added a commit to wking/kubebuilder that referenced this issue Nov 16, 2020
Because folks may have 'docker' aliased to 'podman', and Podman
prefers options before positional arguments [1]:

  $ podman build --help | grep CONTEXT-DIRECTORY
     podman build [command options] CONTEXT-DIRECTORY | URL

Generated with:

  $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ')
  $ git checkout HEAD -- docs/kubebuilder_v0_v1_difference.md

The docs checkout leaves historical docs alone [2].

[1]: containers/podman#2811
[2]: kubernetes-sigs#1817 (comment)
wking added a commit to wking/kubebuilder that referenced this issue Nov 16, 2020
Because folks may have 'docker' aliased to 'podman', and Podman
prefers options before positional arguments [1]:

  $ podman build --help | grep CONTEXT-DIRECTORY
     podman build [command options] CONTEXT-DIRECTORY | URL

Generated with:

  $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ')
  $ git checkout HEAD -- docs/kubebuilder_v0_v1_difference.md
  $ git checkout HEAD -- pkg/plugin/v2 testdata/project-v2*

The docs checkout leaves historical docs alone [2].  The v2 checkouts
are because Adrián and Camila consider this minor and not worth fixing
in v2 [3].

[1]: containers/podman#2811
[2]: kubernetes-sigs#1817 (comment)
[3]: kubernetes-sigs#1817 (comment)
wking added a commit to wking/kubebuilder that referenced this issue Nov 16, 2020
Because folks may have 'docker' aliased to 'podman', and Podman
prefers options before positional arguments [1]:

  $ podman build --help | grep CONTEXT-DIRECTORY
     podman build [command options] CONTEXT-DIRECTORY | URL

Generated with:

  $ sed -i 's/ . -t \([^ ]*\)/ -t \1 ./' $(git grep -l 'docker.*build.* \. ')
  $ git checkout HEAD -- docs
  $ git checkout HEAD -- pkg/plugin/v2 testdata/project-v2*

The docs checkout leaves historical docs alone [2,3,4].  The v2
checkouts are because Adrián and Camila consider this minor and not
worth fixing in v2 [5].

[1]: containers/podman#2811
[2]: kubernetes-sigs#1817 (comment)
[3]: kubernetes-sigs#1817 (comment)
[4]: kubernetes-sigs#1817 (comment)
[5]: kubernetes-sigs#1817 (comment)
@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 24, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 24, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments.
Projects
None yet
Development

No branches or pull requests

3 participants