i am trying to push a image to myown docker registry.I got invalid endpoint registry error.When i googled it i got solution of running these commands.This is the link Remote access to a private docker-registry when i try to run first command i.e service docker stop i will get always service is not recognised.Rest other docker commands run fine.I googled it but not getting much help.If any one can help me how to solve this problem?
Is it because you installed docker.io so the service is called docker.io?
Does service docker.io stop work?
See https://docs.docker.com/installation/ubuntulinux/ for how to get a much newer version.
Related
I'm new to using Docker (never used it before) and I'm running into these errors:
I installed the Docker for Windows and following the steps on this
tutorial, but Docker Desktop doesn't load up for me at all.
I tried to run the docker pull hello-world command but I'm getting the error: The system cannot find the file specified. In the default daemon configuration on Windows, the docker client must be run elevated to connect. This error may also indicate that the docker daemon is not running.
How do I fix this? Thanks
I am currently despairing at the attempt of setting up a docker build step in Atlassian Bamboo.
For starters, I just want to create a build configuration that runs the hello-world image as a proof of confluence. So far, I have failed.
I have tried following the steps on https://confluence.atlassian.com/bamboo0609/using-bamboo/jobs-and-tasks/configuring-tasks/configuring-the-docker-task-in-bamboo , but to no avail.
My setup is this:
We have Bamboo installed on an Ubuntu server. I also installed Docker on that server and added the bamboo user to the docker usergroup and restarted the server to make sure the permission change takes effect. At this point, docker run hello-world works when I run it directly on the server. I can also confirm that this is the server that Bamboo runs on since Bamboo went offline whenever I restarted the server that I installed Docker on.
Then, I have added the docker capability to the server (the agent is the default agent, so it inherits this capability from the server). As the docker path, I have tried various things, none of which worked (aka, the following errors remained the same for each of these):
/snap/docker (the first folder that I found on a manual search)
/usr/bin/docker (the recommended path, though on inspecting the Ubuntu server I quickly found out that no docker folder exists under /usr/bin on the Ubuntu derver)
/var/snap/docker/common/var-lib-docker (the path that Docker returns as its Root Directory when I run docker info on the Ubuntu server)
/var/snap/docker (for good measure)
Now, for the runner, I have tried two different approaches.
First, I tried using a Docker runner with the following settings:
Command: Run a Docker container
Docker image: hello-world
This returns the following error message:
┊
Error occurred while running Task 'Hello World Docker Test(5)' of type com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli.com.atlassian.bamboo.task.TaskException: Failed to execute task
┊
Caused by: com.atlassian.bamboo.docker.DockerException: Error running Docker run command
┊
Caused by: com.atlassian.utils.process.ProcessException: Error executing /snap/docker run --volume /var/atlassian/application-data/bamboo/xml-data/build-dir/CAM-DOC-JOB1:/data --workdir /data --rm hello-world
┊
The second was just to run a shell runner for the command docker run hello-world, which returned the following error:
docker: not found
At this point, I feel like I'm out of ideas. Everything points towards Bamboo for some reason not finding Docker on the server, even though I can clearly confirm that it is there. I have tried various different approaches of telling Bamboo where to find Docker, but none of them have worked.
It's obvious that I'm doing something wrong, but I can't figure out what. Or maybe the problem lies in an entirely different direction altogether? Anyway, I would be grateful for any insight shared on this matter.
Okay, I found out what caused this strange behaviour.
The problem was that I installed Docker using sudo snap install docker, and apparently installing docker via snap causes problems with Bamboo.
So I got it to work using these simple steps:
[Server] Uninstalled Snap Docker using sudo snap remove docker
[Server] Reinstalled Docker using sudo apt install docker.io
[Bamboo] Changed the path to Docker in the Server Capabilities to /usr/bin/docker
After that, the hello-world image build succeeded and printed the expected output to the log.
Working on getting development environment setup in Minikube and ran across an issue pulling images from the https://quay.io/v2/ registry.
I have ran the command:
eval $(minikube docker-env) .
Which allows me to build my local Dockerfile in Minikube and it does a great job with that and deployments work great with local images.
I then used helm to install
helm install stable/mssql-linux .
Which worked fine and its image points to this microsoft/mssql-server-linux:2017-CU3 HERE
I am also working with redis-ha and installed like so:
helm install stable/redis-ha --set="rbac.create=false"
The rbac.create=false seems to allow it to install in Minikube without causing all sorts of issues. However, despite creating deployments and services...the deployments ultimately fail because it cant pull the image.
I get the following error:
Failed to pull image "quay.io/smile/redis:4.0.8r0": rpc error: code = Unknown desc = Error response from daemon: Get https://quay.io/v2/: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
The deployments point to this registry image: quay.io/smile/redis:4.0.8r0
I have changed my DNS pretty much everywhere I could to point to 8.8.8.8 as it seems like it cant resolve the URL. It could also just be that I need to add the registry someplace? I kind of feel that its registry specific since Minikube docker daemon appears to be able to pull from docker hub but not quay.io.
If I use a terminal that is not running eval $(minikube docker-env) and use the docker daemon on my host computer I can pull the quay.io/smile/redis:4.0.8r0 image just fine...ssh into minikube and try and it cant pull.
Minikube version
minikube version: v0.25.0
Docker for Mac
Version 17.12.0-ce-mac55 (23011)
as it seems like it cant resolve the URL
What lead you to believe that, when the error clearly states that it has a Client.Timeout exceeded while awaiting headers? It resolved the registry to an IP address, and even apparently opened a network connection to what it thinks is the registry's IP and port. But after that, the networking stack in minikube did not, in fact, allow the traffic out. Observe that the error wasn't DNS, and it wasn't connection refused, it was connection timed out. That is almost always a firewall-esque behavior.
That smells very, very much like a corporate HTTP proxy, since your machine can interact with the Internet but minikube cannot.
There are a ton of troubleshooting steps one could go through, however, if you are interested in a very quick win, you can, from your working host computer, run docker save quay.io/smile/redis:4.0.8r0 | ssh-into-minikube "docker load" and treat minikube as if it were airgapped.
I dont know what the underlying reason was...perhaps Minikube just being fragile but ended up:
Removing minikube
rm -rf ~/.minikube
Running start again
minikube start --vm-driver=hyperkit
Reran init helm init
Now everything is pulling as it should....
FYI - This all works when run on a Mac, but I am wanting to run on Windows.
I am running the following commands from IntelliJ terminal:
1 - docker login (logging in with my credentials and getting the success message)
2 - docker-compose up (to create and start the container)
However upon running the second command, I am greeted with:
Pulling marklogic (xxxxxxx:latest)...
ERROR: pull access denied for ..., repository does not exist or may require 'docker login'
I have searched the forums and found nothing to explain what is going wrong, other than my colleagues explanation that Windows is rubbish.
Any help would be appreciated.
Some extra info:
docker -v
Docker version 17.12.0-ce, build c97c6d6
docker-compose -v
docker-compose version 1.18.0, build 8dd22a96
Well pressassociation/faux-uds-marklogic isn't in DockerHub, so I guess you have to build that first yourself, or make sure your are pointing at an internal company repository that someone else has pushed the image to.
Perhaps it works on the Mac because a docker login has been made to an internal registry before running the docker-compose up ?
Do you use your own registry (docker-registry.xxx) in your project?
I'm trying to check the installation docker pull hello-world
But getting the following error:
Pulling repository hello-world
Get https://index.docker.io/v1/repositories/library/hello-world/images: remote error: access denied
I have CentOS 6.5
Docker version 1.7.1, build 786b29d/1.7.1
I'm in a corporate network but curl https://index.docker.io/v1/repositories/library/hello-world/images forks fine.
What might be the issue?
Thanks in advance!
I got this error while I was trying to pull mongodb image instead of mongo.
So make sure image name is correct. The very same error message happens on both run and pull commands.
Had the same problem & error on the host working via proxy.
In essence - if you are behind an HTTP proxy server, you will need to add proxy configuration in the Docker systemd service file.
https://docs.docker.com/engine/admin/systemd/
(See at "HTTP proxy" section).
This helped me.
Did you add your user in docker group
https://docs.docker.com/engine/installation/linux/centos/#/create-a-docker-group
Otherwise, you should execute docker command with sudo before
docker pull hello-world