How to change docker repository for masakari? - docker

hi i am install masakari using kolla-ansible when it try to pull container it throw error `The repository not exist or request denied i check docker hub the image not present there , is there setting in kolla to download the docker image with other name which is present on docker hub.
Global.yml
#kolla_base_distro: "centos"
#kolla_install_type: "binary"
#openstack_release: "ussuri"

Based on your global.yml it should work when you run the following commands to download and rename your prefered docker-images:
docker pull odivlad/masakari:api
docker pull odivlad/masakari:engine
docker pull odivlad/masakari:rc8
docker tag odivlad/masakari:api kolla/centos-binary-masakari-api:ussuri
docker tag odivlad/masakari:engine kolla/centos-binary-masakari-engine:ussuri
docker tag odivlad/masakari:rc8 kolla/centos-binary-masakari-rc8:ussuri
After this the images should match the correct name and should be found by the kolla-ansible run.
I have never used masakari by myself und can not check this in my own kolla-ansible test setup. So it is only a theoretical solution for your problem.

Related

Docker registry mirror

I'm trying to set a docker mirror to be the default mirror to pull/push images.
As per documentation I already set the file /etc/docker/daemon.json with the following:
{
"registry-mirrors": ["https://localregistry"]
}
Then I try the following:
docker login localregistry
docker pull localregistry/image:tag > it works
docker pull image:tag > doesn't work
I'm always getting "no basic auth credentials error" from the docker daemon, but from the registry log I get err.code="manifest unknown" err.detail="unknown tag"
Any idea?
I'm using docker version 19.03.08
docker login localregistry
First, I hope this is changing the name for the question, because the registry name localregistry will not work...
docker pull localregistry/image:tag > it works
The fact that this works indicates that you likely have a registry name with a . or : in the hostname. Otherwise docker would try to pull localregistry/image:tag from the localregistry user on Docker Hub.
docker pull image:tag > doesn't work
This should always work, failures should be transparent to the user if it's really a mirror of Docker Hub. What happens is it resolves that name to docker.io/library/image:tag, first tries to pull from localregistry/library/image:tag, and any error falls back to a pull from Docker Hub, and any error there finally shows to the user.
Most likely the issue is that you didn't include library as the repo name for your image in the local registry.
If you are using this to include images that don't exist on Docker Hub, then I would skip the mirror and simply refer to the mirror explicitly. Doing otherwise creates many opportunities for nonintuitive failures that aren't easy to see. E.g. a stale image can be pushed to your mirror in place of an upstream image, and Docker will stop pulling updates from upstream. And because any mirror errors fall back to Hub, if you use an image name that you have no control over upstream, someone else could take that name on Hub and begin injecting unknown or even malicious images into your server.
If this doesn't answer your question, then I'd recommend using your question with actual image names and error messages from the logs showing what specifically failed (you can mask out part of the registry name of necessary).

How to load updated docker image onto other machine

I have 2 hosts running the same docker customized image. I have modified the image on host 1 and saved the image to a custom.tar. If I take that image and load it onto host 2 will it just update or should I remove the old docker image first?
There are 2 ways to do that with repository and without repository using load and save.
With repository below are the steps.
Log in on Docker Hub
Click on Create Repository.
Choose a name and a description for your repository and click
Create.
Log into the Docker Hub from the command line
docker login --username=yourhubusername --email=youremail#company.com
tag your image
docker tag <existing-image> <hub-user>/<repo-name>[:<tag>]
Push your image to the repository you created
docker push <hub-user>/<repo-name>:<tag>
Pull the image to host 2
docker pull <hub-user>/<repo-name>:<tag>
This will add the image to docker hub and available on internet and now you can pull this image to any system.
With this approach you can keep the same images with different tags on system. But if you don't need old images better to delete that to avoid junk.
Without docker hub.
This command will create tar bundle.
docker save [OPTIONS] IMAGE [IMAGE...]
example: docker save busybox > busybox.tar
Load an image from a tar archive or STDIN
docker load [OPTIONS]
example:docker load < busybox.tar.gz
Recommended: Docker hub or DTR approach easy to manage unless you have bandwidth issue in case your file is large.
Refer:
Docker Hub Repositories

How to access the locally built docker-image on the docker-swarm manager?

While trying to build a service on docker-machine i got an error of "image doesn't exist" on that docker-machine manager node. As I checked the docker images command on the manager node, no image was there as expected. But on the root docker side I have those images. I want to access these images on the manager node. I've read few articles where it was mentioned that, maybe I've to upload that image on the docker hub then pull it from that hub. But I want to access it locally. Is there any way to do this as I'm newbie to docker.
This is the command what I tried on my manager machine:
docker#manager:~$ docker service create --name "api-client" -p 4200:4200 api_client
This is my docker images output:
REPOSITORY TAG IMAGE ID CREATED SIZE
api_client latest 097b19c4deb8 27 hours ago 1.15GB
But on my docker#manager terminal, my docker image folder is empty.
The problem is that there is no repository to hold the image. The repository needs to be pulled from to a repository to each node in the Swarm before it can execute. In general you need to do the following:
Setup a repository, if you want a local repository there is a guide here, but it will be some hassle to get it up and running i and "insecure http" version. An easier way is to get yourself a free docker hub account and put your image there.
Tag your local image with the repository name. Howto is shown in the guide above.
docker tag <local image> <repository>/<image:tag>
Login to the repository (if in cloud) and push your image to the repository
docker login
docker push <repository>/<image>:<tag>
To run the image (your command)
docker service create --name "api-client" -p 4200:4200 <repository>/<image>:<tag>
Your can also try to pull an image into the local cache of a node using
docker pull <repository>/<image>:<tag>

Cant pull docker repo

I created a docker repo which I wanted to pull for a local copy.
I want to create an image that can be used by anyone and everyone in the team will have a common work env.
I ran this command on my Ubuntu 14.04 :
docker pull xanthelabs/dev
The output is :
Using default tag: latest
Pulling repository docker.io/xanthelabs/dev
Tag latest not found in repository docker.io/xanthelabs/dev
I am new to docker and dont know what to do to remove this error. What should I be doing?
PS: I've been able to successfully pull images that are already available on the hub like ubuntu:14.04 and centos, so I know the installation is up and working.
To pull images first you need to push something to your repo. I checked https://hub.docker.com/r/xanthelabs/dev/ and it seems that you haven't pushed anything yet.
So first (in directory with your Dockerfile):
docker build --tag xanthelabs/dev .
docker push xanthelabs/dev
And then:
docker pull xanthelabs/dev
For doing pushes you need to be logged in (docker login).

Docker pull repositoryName don't work can't see public repos

So im trying to pull a fresh repository from docker, wich it seems to be pretty easy but i just can't.
Im seeing this (check image)
but im getting "repository not found", this is what im running.
bash-3.2$ docker pull ethaan/test
Pulling repository ethaan/test
Repository not found
bash-3.2$
Also im trying with Kitematic, but its kinda the same, here are som ss from kitmatic.
First the "my repos view"
Now when i click on "create", i got this error.
UPDATE
Updating Start Repository email image
Update view from docker hub enterprise
If this is a private repository (it doesn't exist from my view), you will need to login first.
https://docs.docker.com/reference/commandline/login/
Usage: docker login [OPTIONS] [SERVER]
Register or log in to a Docker registry server, if no server is
specified "https://index.docker.io/v1/" is the default.
-e, --email="" Email
-p, --password="" Password
-u, --username="" Username
You are not able to pull it because you just don't have any tags in ethaan/test. That is, the repository is empty. Once you push a tag, you will be able to pull it. Just to test, try the following:
docker pull busybox
docker tag busybox ethaan/test:test
docker push ethaan/test:test
Then you will be able to pull it as:
docker pull ethaan/test:test

Resources