I installed Docker desktop for mac. The version is 1.12.0-rc4-beta19
when I use docker build -t self/centos:java8 .
the image has no name or tag
REPOSITORY TAG IMAGE ID CREATED SIZE <none> <none> 1581ffcbfd7f 5 minutes ago 196.8 MB
What is wrong with the build command?
We can also build a Docker image without using any tag. Docker always points to the latest stable release using the latest tag. Old releases can even be called the latest. But we can't predict whether it is a major or minor version.
When we use the Docker build command to build an image from a Dockerfile, we use the -t option to give a name and tag to the image. For example, let's check out the Dockerfile and the command below. $ docker build -t myubuntuimage:version1 .
You can rename your docker image by docker tag command. Use the below given command to do that. To rename docker container, use the rename sub-command as shown, in the following example, we renaming the container discourse_app to a new name disc_app.
is your image building correctly? the name does not get set when there is an error in the build. This because every step in the build is a new image created and with an error you won't get to the last step with the correctly named image
btw you can set it manually with the tag command https://docs.docker.com/engine/reference/commandline/tag/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With