Create an icon for docker image - docker

I create docker image of my application (songkong/songkong) but I notice it doesnt have an icon whereas many other docker images do, how do I add an icon to the docker image ?
(my docker image is available on docker hub)

Not all official images have an associated icon. For instance, adoptopenjdk.
An image like logstash would use a logo.png in the docker-library/docs repository.
docker-library/docs issue 1060 asked: How do you add the icon for an image on Docker Hub?
But... there does not seem to be any formal process associated to that.
Only to become an official image.

Related

Change logo for certain Docker hub repository [duplicate]

I create docker image of my application (songkong/songkong) but I notice it doesnt have an icon whereas many other docker images do, how do I add an icon to the docker image ?
(my docker image is available on docker hub)
Not all official images have an associated icon. For instance, adoptopenjdk.
An image like logstash would use a logo.png in the docker-library/docs repository.
docker-library/docs issue 1060 asked: How do you add the icon for an image on Docker Hub?
But... there does not seem to be any formal process associated to that.
Only to become an official image.

Does the parent image of a Docker image get implicitly pulled from its repository if you run an already-built docker image?

Does the parent image of a docker image, the image source that follows after "FROM" in your Dockerfile, also need to be pulled again if you pull and run that custom docker image which is already built and uploaded? Or is the parent image already embedded in the child docker image?
I am NOT talking about docker build step here, I am talking about just pulling the built image and running it in docker engine.
Edit: NOT talking about pulling manually, too. Just asking if the docker engine automatically pulls.
Edit: I believe the parent image is embedded. But some layer seems to be pulling from its parent image's repository in my test. Note that this is not conclusive. It may well be that the Dockerfile of the parent image is doing something that requires connection to its own repository.
It is part of the image you built so you don't need to pull it again in order to run the container using the built image
Answering my own question here.
A docker image can have multiple layers. If some images of the layers are not distributable, these layers won't be in your registry and they have to be pulled from their original location such as Windows base image from Microsoft Container Registry, etc...
If you want all base layers images to be pulled from your own registry, you have to configure it using
{
"allow-nondistributable-artifacts": ["myregistrydomain.com:5000"]
}
as per this article from docker.
Then when you build and push your image to that registry, it will include all base images - even non-distributable ones.

Unable to get my Docker image's base image

I built a docker image with my on changes on top of a docker image from docker hub. Now I forgot the base image I used to build my image. Is it possible to find that?
I tried inspect and history but that did not give me the required information.
The most obvious answer is to check your Dockerfile if you stil have it.
FROM base-image:tag
Its probably not the case, so the best you can do is run
docker images - check when your image has been created and check all the images that were created before your image.

can I use any docker image as a base image or is there a predefined base images?

If I want to build a docker image,
I need to base on a docker base image.
All the example I found are based on top of official images.
Can I base my image on other docker user images ?
The FROM line in your Dockerfile can point to any image. It may be an upstream image from the Docker hub, one on any other registry server including one you self host, or it may be another image you've built locally on your own docker build host. Lastly, it may be FROM scratch which starts without any base image, and is used by other base images at some point in their history.

Content of a Docker Image that is pushed to DockerHub

I created a Docker image locally using following sample Docker file
FROM ubuntu
ADD myfile.zip /opt/myfile.zip
If I push the built image to DockerHub as a public image, does that image
contain both files from ubuntu image and myfile.zip or does it only contain myfile.zip? If it contains only myfile.zip, when someone pull the image from DockerHub does he have to manually / automatically pull ubuntu image first?
The image will contain the Ubuntu docker image, and your mufile.zip.
You can check the size shown by
docker images ubuntu
and
docker images yourimage
Things may have changed since this article
https://www.brianchristner.io/docker-image-base-os-size-comparison/
but Ubuntu was 188 MB at that time, your image should be bigger by the size of your zip
This docker documentation explains it
https://docs.docker.com/engine/userguide/storagedriver/imagesandcontainers/

Resources