I have installed 3 couchbase nodes of docker containers. After a couple of weeks when i tried to log in i could not remember my admin password. After a research i can not find a way to reset password. I am a newcomer to docker world so maybe i missed something. There is a source below but i believe that does not compromise my problem. How can i reset admin password ?
source
The only way to reset your admin password that I'm aware of is to use couchbase-cli's reset-admin-password option, which must be run locally.
Since you are in docker, one option would be to execute bash inside of Docker, and run couchbase-cli there. For instance:
docker exec -it db /bin/bash
At that point, you should have a bash prompt, and you can run couchbase-cli there.
I found a solution and wanted to share you all. After i clicked docker dashboard via docker gui i went for the container's bash then executed codes below.
couchbase-cli reset-admin-password --new-password 123456
Above Mr. Matthew clues us in with a more sophisticated way of going for container's bash.
Related
I have scrubbed the internet for detailed instructions on how to install Docker specifically on a Synology DS120j (aarch64, running DSM 7.1.4) and still need some help.
For confirmation I checked,
uname -m
aarch64
I'm seeing that it looks to be possible to in stall Docker on this non-Intel machine but so far the instructions I've read are not as specific (step by step) as I apparently need them to be because something's not quite working.
End use is installing and running Home Assistant on this machine (which requires Docker) as an alternative to Raspberry Pi 4 because they are so hard to find and the DS120j seems to be an economic alternative (I have Homebridge successfully running on it and it's working great).
Though it looks like I was able to (sort of) install Docker, I can not access the Docker GUI / it does not show up in my package center. I'm not sure how I can install Home Assistant without the Docker GUI.
So I'm not sure if what I've done right and wrong along the way but have tried multiple methods (from 4 post on Stackoverflow) to get to this point but I might need to start from scratch, which I'm completely prepared to do!
I have tried steps 1 - 6 from this Stackoverflow post including trying the automatic script (and also a second automatic script from a link that was posted further down the in the post replies).
Can I install Docker on arm8 based Synology Nas
Any detailed step by step instructions or insigts would be greatly appreciated.
I have held off for two weeks posting about this but am doing so now because there seems to be a lot of people buying these cheap DS120j NAS machines to run Homebridge / Home Assistant and other servers in place of Raspberry Pi's.
Thank you!
M
This is one script that I have tried:
#!/bin/sh
#/bin/wget -O - https://raw.githubusercontent.com/wdmomoxx/catdriver/master/install-docker.sh | /bin/sh
/bin/wget https://raw.githubusercontent.com/wdmomoxx/catdriver/master/catdsm-docker.tgz
tar -xvpzf catdsm-docker.tgz -C /
rm catdsm-docker.tgz
PATH=/opt/sbin:/opt/bin:/opt/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
/opt/etc/init.d/S60dockerd
sudo docker run -d --network=host -v "/run/docker.sock:/var/run/docker.sock" portainer/portainer:linux-arm64
echo "猫盘群晖Docker安装完成"
echo "浏览器输入群晖IP:9000进入Docker UI"
also
sudo mkdir -p /volume1/#Docker/lib
sudo mkdir /docker
sudo mount -o bind "/volume1/#Docker/lib" /docker
This tip from comments in the above Stackoverflow post, I do not understand though,
"Then set the data-root in /etc/docker/daemon.json: { "data-root": "/docker" }"
I have also created a docker user group and added my name to the group but I'm not sure if docker is set to associate the two.
However when I currently ssh into the Diskstation and
docker --version"
I do get,
Docker version 20.10.0, build 7287ab3
but I can not seem to see or launch the Docker GUI.
I see there is talk on the next about using Portainer but I'm not sure how to get that running as well.
I have created an Admin account in Jenkins after unlocking the Jenkins and doing the initial setup.
Now I have forgot the password of the admin account and I am not able to login Jenkins
First, enter the docker container by using
sudo docker exec -it [containerID] bin/bash
Your container is likely clean and need to install editing tools, run
apt-get update && apt-get install nano
Then, find the config.xml file. For my container, it is in /var/jenkins_home/config.xml. You can also try /var/lib/jenkins/config.xml.
nano /var/jenkins_home/config.xml
Change the useSecurity tag to false.
docker restart [ContainerID]
Now, you can visit the Jenkins page and it should be showing the Dashboard right the way without password. You should reset the password, by going to Dashboard -> Manage Jenkins -> Security -> Configure Global Security
, set Security Realms to Jenkins' own user database and press Apply.
Next, go to People and click the admin account, you should be redirected and see a button named Configure, set a new set of password in Password section and press Apply.
Then, go to Configure Global Security again, set Authentication to the option other than Anyone can do anything
Your password should have been reset, finally, go set the value of useSecurity to true again and restart the container. Hope this help!
As you running Jenkins in a Docker container you have to go to the inside of the container.
by typing below command $docker exec -it (container-ID) /bin/bash
After entering the container you should follow these step which mentioned on this post https://techpostal.blogspot.com/2020/01/how-to-reset-jenkins-admin-password.html
then check it and one more thing when you are done with the resetting password you shoud commit the docker images for future use of that image.
If you are using docker, all of that described before seems to me too much of a hazzle.
Remove container and volumes used
Start afresh again
Reference: https://www.jenkins.io/doc/book/installing/docker/
I am trying to get the Superset running on ubuntu server. I have referenced the steps from Superset page as below:
git clone https://github.com/apache/incubator-superset/
cd incubator-superset/contrib/docker
# prefix with SUPERSET_LOAD_EXAMPLES=yes to load examples:
docker-compose run --rm superset ./docker-init.sh
# you can run this command everytime you need to start superset now:
docker-compose up
I have fixed the initial issues around right version of docker-compose and postgress address bind issue on port 5432. So after fixing those my docker compose run command
docker-compose run --rm superset ./docker-init.sh
works fine and it asks me to set up a user name and password.
Finally to get the container running I run the final command
docker-compose up.
On my mac, it would run redis, postrgre container and then give me a localhost:8088 for me to get access to Superset UI with login info.
However on Ubuntu, when I run that, I first get this:
So looks it is running redis and postgres containers fine.
But then it is giving me Permission denied errors to create some mkdir directory.
Pls note I am running it as root user.
Also, my docker compose version is fine with 1.23.2 and my docker along with docker-compose is installed under
/usr/bin/docker and not /usr/local/bin/docker.
But I think that shouldn't be an issue.
Any help where it is going wrong and how can I fix it?
Thanks
Edit:
Ok I looked at the same issue mentioned on Github. And used a suggestion of using it only for Production and not development in docker-compose.yml file.
It seems to not throw the same error now when I do
docker-compose up.
However when I open localhost:8088 it does not connect to the UI.
try this:
mkdir ../../assets
chmod -R 777 ../../superset/assets/
as set in docker-compose.yml#L64, it is using ../../superset as volume when in develop. However the container does not have any permission in the host so the solution is to make a directory by yourself and grant the necessary permissions on to it.
I'm currently trying to finish a Vagrantfile to be used as a docker host by other Vagrantfiles running the docker provider (https://www.vagrantup.com/docs/docker/).
I am using centos/atomic-host as a base box. The problem is that when I run vagrant up I get:
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.
Command: "docker" "ps" "-a" "-q" "--no-trunc"
Stderr: Cannot connect to the Docker daemon. Is the docker daemon running on this host?
And this is due to the vagrant user not being part of the docker group. I solve this by adding this to my Vagrantfile:
# Add user vagrant to docker group
$docker_group = <<-DOCKER_GROUP
groupadd docker
usermod -a -G docker vagrant
systemctl restart docker
DOCKER_GROUP
config.vm.provision "docker_group", type: "shell", privileged: true, inline: $docker_group
I still get the exception above the first time I run vagrant up but it works from the second time onwards. The reason I suspect is that after adding the vagrant user to the docker group I need to logout/login for the changes to take effect.
For the record, I tried adding newgrp docker at the end of the my $docker_group script but it doesn't solve the problem. I suspect the docker provider starts a separate session.
Anybody found a solution for this?
I am not aware of Vagrantfile, but what I understand from your question is that you need some way to refresh a user's group without having to re-login.
If that's the case, the following points may help you:
Why not just su to the user again: you may just login in to the user again, and all the user's group will be updated.
Or you may try the this approach Legooolas has mentiones.
I hardly think the problem you mentioned is with the Vagrantfile, it's just the way it is. To update user's configurations, you need to re-login with the user. Still, if you wish to find a way, the above two might help you out.
Although this post is tempted to be closed for many I should ask what I am doing wrong since I am getting crazy and can't find a solution.
I have installed Docker in Fedora 24 and everything seems to be fine but I can't run docker command without sudo and that's annoying (at least for me).
I am logged as a normal user (non-root) and as soon as I run a command I can see this message:
$ docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?
However if I run only docker I can see a list of possible commands :-\
I've followed this guide and I read also a lot (here is a small list):
http://bsaunder.github.io/2014/12/21/running-docker-without-sudo/
Running Docker as non-root user
How to run docker image as a non-root user?
But certainly I am missing something, can any illuminate me? What I am missing here? I know the problem become user has not permissions to /var/run/docker.sock but what's the fix?
Running docker to get the list of commands doesn't use a connection to the daemon, which is why you can run it as non-root.
Have you added your user to the docker group?
sudo usermod -aG docker <my-user>
If you do that, next time you log in you should be able to use the docker CLI without sudo. But beware that the docker group has root privileges, so this is a convenience but not a security improvement.