Reputation: 1768
My goal is to name an image when building it from a Dockerfile. However, for a particular image (based on a corporate template I have to use) -t myImage
seems to have no effect.
What do I mean by that? If I run docker build -t myImage .
and then docker images
both the repository and the tag column are empty. Here is a screenshot with said image in the second row.
The first row shows a test image I built with docker build -t test .
based on this Dockerfile:
FROM busybox
RUN echo "hello world"
Naming the said image after it has been built with docker tag 1cb myImage
works.
Upvotes: 0
Views: 43
Reputation: 468
Please try the following command in your project directory :
docker build -t=myImage .
or
docker build --tag=myImage .
This should work!
Upvotes: 1