I've made the images of Ubuntu 14:04, on my local laptop. Then I want to commit images,
I run this command to commit
$ sudo Docker commit 2a1aef6a0547
However, there is no name on the repository and TAG
Like this, check images
$ sudo docker images
The results
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
<none> <none> 87ab1f8aeb2f 12 minutes ago 5.34 GB
ubuntu 14.04 e9ae3c220b23 2 weeks ago 187.9 MB
Name repository and tag is <none>
To be able to give a name, use syntax like??
To give tag to a docker file during build command: docker build -t image_name:tag_name . otherwise it will give latest tag to you image automatically.
To push an image to Docker Hub, you must first name your local image using your Docker Hub username and the repository name that you created through Docker Hub on the web. You can add multiple images to a repository by adding a specific :<tag> to them (for example docs/base:testing ).
Labels are used in Dockerfile to help organize your Docker Images.
To apply a Docker image tag to a build, use the -t switch. For example, this creates a tag of "myapp_debug" on the image: docker build -t myapp:debug -f Dockerfile.
Check the docker commit usage parameters:
Usage: docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]
In fact, the example presented there shows how to do this:
$ docker commit c3f279d17e0a SvenDowideit/testimage:version3
f5283438590d
$ docker images
REPOSITORY TAG ID CREATED VIRTUAL SIZE
SvenDowideit/testimage version3 f5283438590d
Depending on what you are trying to do though - you may wish to start building images from a(n) (existing) Dockerfile
instead.
Running this syntax
$ sudo docker tag 87ab1f8aeb2f name_your_images:latest
Example
$ sudo docker tag 87ab1f8aeb2f ubuntu_test:14.04
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