I'm running Docker on my Synology DS918+ and I'm looking to run the jetbrains/teamcity-server container.
When I run the following command:
sudo docker run teamcity-server -v /volume2/docker/teamcity-server/datadir/:/data/teamcity_server/datadir -v /volume2/docker/teamcity-server/logs/:/opt/teamcity/logs -p 8001:8001 jetbrains/teamcity-server:latest
I get a result back that it can't find the image locally:
Unable to find image 'teamcity-server:latest' locally
docker: Error response from daemon: pull access denied for teamcity-server, repository does not exist or may require 'docker login'.
See 'docker run --help'.
I believe that I have confirmed that I have the image installed locally because when I run the command:
sudo docker images
I get the following result:
REPOSITORY TAG IMAGE ID CREATED SIZE
jetbrains/teamcity-server latest bfe4a2f841c1 2 weeks ago 2.2GB
The correct way is to use --name before the container name (teamcity-server). Otherwise, docker will think that it is the image that you are trying to pull and error out.
sudo docker run --name teamcity-server -v /volume2/docker/teamcity-server/datadir/:/data/teamcity_server/datadir -v /volume2/docker/teamcity-server/logs/:/opt/teamcity/logs -p 8001:8001 jetbrains/teamcity-server:latest
Related
I have Ubuntu 22.04 and run next command:
docker run -d mypostgres -e POSTGRES_PASSWORD=1111 postgres -c shared_buffers=256MB -c max_connections=200
and I got following answer:
Unable to find image 'mypostgres:latest' locally
docker: Error response from daemon: pull access denied for mypostgres, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
So what is the correct name for 'mypostgres'?
Can I write here the occasional name that I want?
You should use postgres instead if you want to download the image from dockerhub. If you want specific version you can use tags provided on the dockerhub page ie. postgres:14.5
What you are missing here is --name switch before mypostgres You can use --name switch to name your container
Full command:
docker run -d --name mypostgres -e POSTGRES_PASSWORD=1111 postgres -c shared_buffers=256MB -c max_connections=200
--name before mypostgres , because docker understood that you want an image called mypostgres not a postgres images. and didn't find an official image with that name.
I have got the Verdaccio running with docker on my system using:
docker pull verdaccio/verdaccio
docker run -it --rm --name verdaccio -p 4873:4873 verdaccio/verdaccio
I can then see my Verdaccio at localhost:4873.
I add a user:
npm adduser --registry http://localhost:4873/
I go to a simple package repo and publish it:
npm publish --registry http://localhost:4873/
I then go to the browser and see my package is in the list on localhost
I then rename my docker container:
docker rename 4d2b---3692 my-container
On docker hub I have a repo called myuser/my-container
I then commit my container
docker commit 93ba9d----e myuser/my-container
Then I push it to Docker Hub (I did log in already)
docker push myuser/my-container
I see that it is updated on my Docker Hub.
I remove everything related to Docker on my computer
docker rmi --force 93ba9d----e
I then see nothing when I run these commands
docker ps -a
docker images
Then I try and pull my container
docker pull myuser/my-container
I then run my container
docker run -it --rm --name verdaccio -p 4873:4873 myuser/my-container
I can then see the Verdaccio page on localhost:4873, however I can not see the published package.
Please let me know what I am missing, thanks.
I run the following docker command. I don't understand why it is failed. Could you show me how to debug this? Thanks.
$ docker run -v `pwd`:/share -ti --name aerospike-aql --rm aerospike/aerospike-tools aql --host 192.168.1.191 --no-config-file
Unable to find image 'aerospike/aerospike-tools:latest' locally
latest: Pulling from aerospike/aerospike-tools
6ec7b7d162b2: Pull complete
177617b11d13: Pull complete
10273812b9e3: Pull complete
ac553cdb1df6: Pull complete
d633ea8cb425: Pull complete
1f91817a9ef3: Pull complete
403620a9a728: Pull complete
3a80741c7bbc: Pull complete
Digest: sha256:109801d7e8440dcf53461b13b55eaa96c1f86482209691285a34c6bb2fee4e1d
Status: Downloaded newer image for aerospike/aerospike-tools:latest
Seed: 192.168.1.191
User: None
Config File: None
2021-01-16 02:46:44 WARN Failed to connect to seed 192.168.1.191 3000. AEROSPIKE_ERR_CONNECTION Socket write error: 111, 192.168.1.191:3000
Error -10: Failed to connect
To add to Micah's comment I can suggest running again the server image, and then the command below that is not using the hardcoded host IP 192.168.1.191 but rather pulls it from the settings:
$ docker run --rm -tid --name aerospike -p 3000:3000 -p 3001:3001 -p 3002:3002 -p 3003:3003 aerospike/aerospike-server
$ docker run -v `pwd`:/share -ti --name aerospike-aql --rm aerospike/aerospike-tools aql --host $(docker inspect -f '{{.NetworkSettings.IPAddress }}' aerospike) --no-config-file
I created an image called "helloworld" based on some project I have.
If I run :
docker images
I can see it there on top of the list.
Now if I want to run it, docker complains it does not exist.
Running this :
docker run -p 8080:8080 helloworld
returns this :
docker: Error response from daemon: pull access denied for helloworld,
repository does not exist or may require 'docker login': denied:
requested access to the resource is denied. See 'docker run --help'.
Why is docker complaining that my image does not exist?
It complains, because this:
docker run -p 8080:8080 helloworld
is a shortened version of this:
docker run -p 8080:8080 docker.io/library/helloworld:latest
and, based on the screenshot, your image is called
docker.io/library/helloworld:1.0
so the proper command (skipping default prefix) is:
docker run -p 8080:8080 helloworld:1.0
Other answers are correct but don't explain clearly why they are correct.
The docker run command expects an image name and, optionally, a tag (i.e., docker run IMAGE[:TAG]). If a tag is not provided, the default is latest.
Running docker run helloworld is equivalent to docker run helloworld:latest, but this image does not exist in the OP's system according to docker images.
The solution is to specify the image tag: helloworld:1.0.
Your image build command:
docker build --rm -f "Dockerfile" -t helloworld:1.0 "."
Meaning your image name is helloworld:1.0
If you had run docker build --rm -f "Dockerfile" -t helloworld "."
Then your image name is helloworld or helloworld:latest and your first try would have worked.
To solve your issue run this instead:
docker run -p 8080:8080 helloworld:1.0
I'm trying to install the https://github.com/dani-garcia/bitwarden_rs docker container on OSX (docker installed via a brew cask).
Running:
docker pull bitwardenrs/server:latest
successfully pulls the image but running
docker run -d --name bitwarden -v /bw-data/:/data/ -p 80:80 /bitwardenrs/server:latest
results in
docker: Error response from daemon: Mounts denied: no context set
I could not find any mention of that docker error anywhere
Thank you! It was indeed a directory permission issue, pointing it at any shared directory fixes it, e.g.
docker run -d --name bitwarden -v /tmp/bw-data/:/data/ -p 80:80 bitwardenrs/server