Change logo for certain Docker hub repository [duplicate] - 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

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.

Create an icon for docker image

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.

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.

Is there a way to directly deploy a container from docker hub to google compute engine?

When you create an instance on google compute engine there is an option to "Deploy a container image to this VM instance", which if you select asks for a container image
In the box for the container image it says "for example, gcr.io/google-containers/busybox" and clicking on the question mark next to the words "Container image" brings up "Name of a public image on any registry, or a private image hosted on Google Container Registry."
From this I infer that I can deploy an image directly from docker hub without needing to first upload it to the google container repository. However, I am having trouble with how I am supposed to direct the instance to the desired image.
For example if the image is username/repo:tag, I have tried putting username/repo or username/repo:tag as the container image, but when I load up the instance I am not in the container and the image isn't even listed on the docker images -a
What address should I be using?
Yes, you may deploy an image directly from the docker hub.
When creating an instance in GCE, in the Container Image text box, you have to type the full path of the docker hub repository.
For instance, for the nginx public docker image, the container image that you should type is registry.hub.docker.com/library/nginx
The registry path for any official docker hub image should be written in the following way: registry.hub.docker.com/library/image.
For a private docker image, the container image that you should type is registry.hub.docker.com/username/repo or registry.hub.docker.com/username/repo:tag.
docker.io/<username>/<repo>:<tag> works as well. Of course it points to the same registry as registry.hub.docker.com, but the pattern nicely matches gcr.io/<username>/<repo>:<tag>.
You can use registry.hub.docker.com/<username>/<image-name>:<tag>
So to deploy to GKE
https://console.cloud.google.com/kubernetes/list
Click 'Deploy'
Existing container image: registry.hub.docker.com/<username>/<image-name>:<tag>

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.

Resources