question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unexpected build-arg causes image to have no name or tag

See original GitHub issue

First reported at docker/docker#23409

An unexpected build-arg does not raise any errors, but causes the resulting image to have no tag.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
shin-commented, Jun 9, 2016

Ah, right, sorry.

First off, just to clarify for myself and others, the leftover image issue also happens while using the Docker CLI, as far as I can tell:

$ docker build --build-arg foo=hello --build-arg bar=world .
Sending build context to Docker daemon 2.048 kB
Step 1 : FROM alpine
 ---> 13e1761bf172
Step 2 : MAINTAINER Joffrey F <joffrey@docker.com>
 ---> Running in 9c605066ca55
 ---> cb7211f9bf95
Removing intermediate container 9c605066ca55
Step 3 : ARG foo
 ---> Running in 8f99338e84db
 ---> 2210f554aa58
Removing intermediate container 8f99338e84db
Step 4 : RUN echo ${foo}
 ---> Running in a1a5c60a7331
hello
 ---> 455c57454e96
Removing intermediate container a1a5c60a7331
One or more build-args [bar] were not consumed, failing build.
$ docker images
REPOSITORY                  TAG                 IMAGE ID            CREATED             SIZE
<none>                      <none>              455c57454e96        5 seconds ago       4.797 MB

As for the matter of detecting build errors - the library will not do it for you. You would have to parse the stream and detect the line(s) that indicate failure (typically a JSON object containing an error key)

0reactions
duplessisaacommented, Jan 30, 2019

Hi guys, same exact error here…

How do I solve it ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

docker build with Dockerfile, but the image has no name or tag
I am getting a successfull built and if i immediately run docker run command i see the name but some how after sometime...
Read more >
Dockerfile reference - Docker Documentation
A Dockerfile is a text document that contains all the commands a user could call on the command line to assemble an image....
Read more >
podman-build - Build a container image using a Containerfile
If no context directory is specified, then Podman will assume the current working directory as the build context, which should contain the Containerfile....
Read more >
Containerfile man page - containers - File Formats - ManKier
To build an image, create a file called Containerfile. ... If no tag is given to the FROM instruction, container engines apply the...
Read more >
10 best practices to containerize Node.js web applications ...
js Docker image name without an image tag which creates ambiguity for which exact image tag is being used—it's not readable, hard to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found