Install a specific docker image of Couchbase - docker

Default command always installs the latest version (currently it's 5)-
docker run -d --name db-cb -p 8091-8094:8091-8094 -p 11210-11211:11210-11211 couchbase
I want to install 4.6.3; how can we specify version in above command.
https://hub.docker.com/r/couchbase/server/tags/

you can specify version as
docker run -d --name db-cb -p 8091-8094:8091-8094 -p 11210-11211:11210-11211 couchbase:4.6.3

Due to some internet issue, below command was not working. So i got impression that it's not the right command.
Below command works -
docker run -d --name db-cb -p 8091-8094:8091-8094 -p 11210-11211:11210-11211 couchbase:enterprise-4.6.3

Related

Docker, unable to run Ghost on default port 2368

Using Official (Docker) image from docker hub:
I was expecting this to work on the default port 2368
but localhost:2368 just hung
docker run -d --name some-ghost2 -v some-ghost-data:/var/lib/ghost/content ghost
localhost:3001 worked
docker run -d --name some-ghost2 -v -p 3001:2368 some-ghost-data:/var/lib/ghost/content ghost
Then the links in the introduction pages failed as they linked to 2368
The fix, which took me a while to get to:
docker run -d --name some-ghost2 -v -p 2368:2368 some-ghost-data:/var/lib/ghost/content ghost

Docker toolbox got stuck with command

I'm new to Docker, i'm using the Toolbox version for dockers. I try the following command:
docker run -it --name myflask1 -p 192.168.99.100:5000 -v ${PWD}:/app python:3.7 bash
The following message appear:
invalid publish opts format (should be name=value but got 'docker-machine')
What is the solution?
Your -p option looks bad. Format should looks:
-p ip:hostPort:containerPort,
-p ip::containerPort,
-p hostPort:containerPort,
-p containerPort.

Apache Zeppelin 0.8.2 docker container login?

It appears all the previous version the Apache Zeppelin official docker container automatically log me in as anonymous. But the latest version, 0.8.2, asks for a login and password. I have not been able to find any mention of this anywhere. Has no one attempted to run this container?
This works: docker run -p 8080:8080 --rm --name zeppelin apache/zeppelin:0.8.1
This doesn't: docker run -p 8080:8080 --rm --name zeppelin apache/zeppelin:0.8.2
Automatic anonymous login works for me:
docker run --rm -ti \
-p 8080:8080 \
-e ZEPPELIN_ADDR=0.0.0.0 \
--name zeppelin \
apache/zeppelin:0.8.2
I'm not sure what the state of it is right now, when I start 0.8.2 I don't get an HTTP response at all. Same command with 0.8.1 works.

Can we run docker inside a docker container which is running in a virtual-box of Ubuntu 18.04?

I want to run docker inside another docker container. My main container is running in a virtualbox of OS Ubuntu 18.04 which is there on my Windows 10. On trying to run it, it is showing me as:
Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
How can I resolve this issue?
Yes, you can do this. Check for dind (docker in docker) on docker webpage how to achieve it: https://hub.docker.com/_/docker
Your error indicates that either dockerd in the top level container is not running or you didn't mount docker.sock on the dependent container to communicate with dockerd running on your top-level container.
I am running electric-flow in a docker container in my Ubuntu virtual-box using this docker command: docker run --name efserver --hostname=efserver -d -p 8080:8080 -p 9990:9990 -p 7800:7800 -p 7070:80 -p 443:443 -p 8443:8443 -p 8200:8200 -i -t ecdocker/eflow-ce. Inside this docker container, I want to install and run docker so that my CI/CD pipeline in electric-flow can access and use docker commands.
From your above description, ecdocker/eflow-ce is your CI/CD solution container, and you just want to use docker command in this container, then you did not need dind solution. You can just access to a container's host docker server.
Something like follows:
docker run --privileged --name efserver --hostname=efserver -d -p 8080:8080 -p 9990:9990 -p 7800:7800 -p 7070:80 -p 443:443 -p 8443:8443 -p 8200:8200 -v $(which docker):/usr/bin/docker -v /var/run/docker.sock:/var/run/docker.sock -i -t ecdocker/eflow-ce
Compared to your old command:
Add --privileged
Add -v $(which docker):/usr/bin/docker, then you can use docker client in container.
Add -v /var/run/docker.sock:/var/run/docker.sock, then you can access host's docker daemon using client in container.

How to launch the Solr techproducts example on Docker?

I am running solr in docker and I tried the commands from the comment.
docker run --name test -d -p 8983:8983 -t solr
docker exec -it --user=solr test bin/solr create -c techproducts -d sample_techproducts_configs
After the last command, I received the following error message:
Unrecognized argument: example/exampledocs/*.xml .
If this was intended to be a data file, it does not exist relative to /opt/solr
Is this the correct location for the techproducts.xml data?
I looked at the official solr image on hub.docker.com and I found this,
docker run -d -P -v $PWD/myconfig:/myconfig solr solr-create -c mycore -d /myconfig
I guess you need to pass in core configuration from your host with bind mount as in the example. In this case it is not myconfig, it is "sample_techproducts_configs"
I tried the following, it worked for me.
docker run --name my_solr -d -p 8983:8983 -t solr
docker exec -it --user=solr my_solr bin/solr create_core -c
techproducts
docker exec -it --user=solr my_solr bin/post -c techproducts
example/exampledocs/

Resources