I am getting these error while running image on docker - docker

docker run -p 8086:8086 --name users-mysql --link mysql-standalone:mysql -d users-mysql
Unable to find image users-mysql:latest locally
docker:
Error response from daemon: pull access denied for users-mysql, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.

The message means that it couldn't find the users-mysql:latest docker image in your local registry neither in the public one. Did you built the image by yourself or you want to use existing one from public repo?
If you want to use the image from public repo don't forget to use the whole name even with the prefix. List of images in public repo: https://hub.docker.com/search?q=users-mysql&type=image
If you built the image by yourself check by docker image ls the image is really present on your local. It could happen that it has a different tag than latest or you set some prefix there.

Related

share volume with existing container

i am new to docker. i want to share a volume with multiple containers which are existing previously in my local pc not in the docker hub.
when i am using the command "sudo docker run -i -t --mount source=volume,target=/volume-shared ubuntu20", this is coming error as below.
Unable to find image 'ubuntu20:latest' locally
docker: Error response from daemon: pull access denied for ubuntu20, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
here ubuntu20 is the container name.
can anyone help.
Thanks in advance.
You need to create volume with mount point on folder you want, and then just mount volume to container.
Check this:
https://docs.docker.com/engine/reference/commandline/volume_create/

docker: Error response from daemon: pull access denied for rhel7/rhel

My docker
I found this cheatsheet from internet: https://design.jboss.org/redhatdeveloper/marketing/docker_cheatsheet/cheatsheet/images/docker_cheatsheet_r3v2.pdf
I catch error
C:\Users\Administrator>docker run -it rhel7/rhel bash
Unable to find image 'rhel7/rhel:latest' locally
docker: Error response from daemon: pull access denied for rhel7/rhel, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
C:\Users\Administrator>
How to fix it?
Well, this error means that the docker image you are trying to pull is private. Only logged user with permissions may pull the image. You may use the command docker login in order to login to docker hub, but if your user does not have the permissions, it will fail anyway.
This document seems to be an internal document of Red Hat. REHL is not a community distribution and there's no image for it in docker hub. You need to use one of the CentOS images instead or try other GNU/Linux distros such as Ubuntu or Debian.
In my case was an error in command.
I have tried to execute this:
sudo docker run -dit --name ${CI_PROJECT_PATH_SLUG} -p "443:443" -p "8050:8050" -p "8069:8069" -p "8052:8052" -p "3306:3306" -p "5432:5432" -p "9003:9003" linux
This param ${CI_PROJECT_PATH_SLUG} was not identified.
It looks wierd because the output is not telling the param is not recognized but this:
docker: Error response from daemon: pull access denied for 443, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
One of the universal error might not be login, you are probably pulling an image that is not in your local machine, or in the community docker hub. go to the dockerhub online and check if such image exist. If it does, then it definitely Login. These are the only possible issues one can face.

Create custom image with Dockerfile and directly run it locally on Win10

My humble Dockerfile looks like this:
# Dockerfile.Ubuntu
FROM ubuntu:latest as builder
RUN ["touch", "test"]
when building the new image with
docker build -f Dockerfile.Ubuntu -t "Dummy:1.0" .
and issuing docker images the newly created images is listed
REPOSITORY TAG IMAGE ID CREATED SIZE
Dummy 11.2 3bffa7d3048d 27 minutes ago 64.2MB
but now, when starting the image with the name docker run -it Dummy bash i receive this error:
Unable to find image 'Dummy:latest' locally C:\PATH....exe: Error response from daemon: pull access denied for Dummy, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
Using the image id works: docker run -it 3bffa7d3048d bash
and i also see the added file /test
Note: I tried all kind of character combinations (camel case, lowercase only..) with the same result.
What do i have to change to start my local image directly by name?
You're just missing the tag in your run command.
docker run -it Dummy:11.2 bash

How to run an AWS Lambda Layer in a Docker container?

I would like to run a Docker container to see what is in a public Lambda Layer.
Following the aws sam layers docs using a sam app with only the pytorch layer I produced the Docker tag then I tried pulling the Docker image which fails with pull access denied / repo may require auth.
I did try aws ecr get-login --no-include-email to auth correctly though still couldn't access the image.
So I think the issue maybe that I am not authorised to pull the image of the lambda layer or the image doesn't exist. It is not clear to me
Alternatively it would be good to download the public Lambda Layer and then I could use https://github.com/lambci/docker-lambda to inspect it
More context about what I tried
So the Lambda Layer I would like to investigate is:
arn:aws:lambda:eu-west-1:934676248949:layer:pytorchv1-py36:1
The docker tag I prodcued is:
python3.6-0ffbca5374c4d95e8e10dbba8
Then I tried pulling the Docker image with:
docker run -it --entrypoint=/bin/bash samcli/lambda:python3.6-0ffbca5374c4d95e8e10dbba8 -i
docker run -it --entrypoint=/bin/bash <aws_account_id>.dkr.ecr.<region>.amazonaws.com/samcli/lambda:python3.6-0ffbca5374c4d95e8e10dbba8 -i
Which both failed with the error:
docker: Error response from daemon: pull access denied for samcli/lambda, repository does not exist or may require 'docker login'.
.
Just a quick potential answer (I've not read the links you provided as I am not at my computer), given you mentioned aws ecr get-login --no-include-email I am assuming you are trying to pull a docker image from AWS's docker repository service.
The line docker run -it --entrypoint=/bin/bash samcli/lambda:python3.6-0ffbca5374c4d95e8e10dbba8 -i, with default config, will look at docker hubs repository. If you are trying to pull a docker image in AWS I would expect something more like docker run -it --entrypoint=/bin/bash aws_account_id.dkr.ecr.region.amazonaws.com/samcli/lambda:python3.6-0ffbca5374c4d95e8e10dbba8 -i (again not saying that cammand will work but something like it to go along with your aws repo sign in command).
Since https://hub.docker.com/samcli/lambda is a 404 I suspect this is one of those occasions the error message is exactly right, the repo does not exist.

install docker container - docker run - invalid reference format

From the docker quickstart terminal on Windows 7 64-bit, I'm following the instructions to install this docker container. I run the command,
docker run http://wiki.openstreetmap.org/wiki/nominatim
and I get this error:
c:\program files\docker toolbox\docker.exe: invald reference format.
I can't find any information about this error related to this container.
You need to pull the image first , then run the container. according to your docker command, you are trying to access a website, it is not a docker container image. so that's why it is giving you the invalid reference format.
The image name that you have specified to pull and run is wrong. The image name should be mediagis/nominatim.
Your docker run command should be
docker run mediagis/nominatim
It is not necessary to pull the image first and run it. By default docker run first tries to find such image in your machine if not then it tries to download from docker repository.
If you specify URL format it directly downloads from private repo if such image is not found in your machine.
Brief Explanation:
Docker takes whatever that is in form of url as an image and the reason for this is sometimes you may want to run image from your private repository. So here http://wiki.openstreetmap.org/wiki/nominatim is considered as an image called wiki/nominatim from a private repo called wiki.openstreetmap.org by docker and the format of private repo and image is wrong . It should be <domain.com>/image:tag where tag is optional. You are not supposed to provide protocol (http://). See this for reference Hence the error is thrown as invalid reference format.
If you would have given as docker run wiki.openstreetmap.org/wiki/nominatim it would have tried to download image called wiki/nominatim from wiki.openstreetmap.org private repo with latest tag. Since no such repo and image exists it reports Error response from daemon: error parsing HTTP 404 response body as the url throws 404: Not Found when docker daemon tries connecting to it.
References:
Pull an image from Docker Hub
Pull from a different registry
docker run
Docker run reference
Note: Unless you specify tag name which is optional docker always downloads latest tag from repo.
docker run http://wiki.openstreetmap.org/wiki/nominatim
does non make any sense syntactically ...
In any case the correct command to get the latest image is:
sudo docker pull mediagis/nominatim:3.1
Notice that each version has its own installation instructions (versions prior to 3.1 were structurally different), so please do refer to the appropriate section:
https://hub.docker.com/r/mediagis/nominatim/tags/
However I do agree with you that
docker run --restart=always -p 6432:5432 -p 7070:8080 -d -v /home/me/nominatimdata/postgresdata:/var/lib/postgresql/9.5/main nominatim sh /app/start.sh
Should be
docker run --restart=always -p 6432:5432 -p 7070:8080 -d -v /home/me/nominatimdata/postgresdata:/var/lib/postgresql/9.5/main mediagis/nominatim sh /app/start.sh
instead. The installation instructions need updating there.

Resources