Rancher: rancher app requires username and password - docker

i installed rancher v0.4.2 container using Docker application, every thing is fine, but when im triyin to get access to rancher UI, i got popup that requires username and password, is there any default username/password to get access ?
Docker run command :
sudo docker run -d --restart=always -e CATTLE_DB_CATTLE_MYSQL_HOST=****.*****.eu-west-1.rds.amazonaws.com -e CATTLE_DB_CATTLE_MYSQL_PORT=3306 -e CATTLE_DB_CATTLE_MYSQL_NAME=cattle -e CATTLE_DB_CATTLE_USERNAME=**** -e CATTLE_DB_CATTLE_PASSWORD=**** -p 8080:8080 rancher/server:0.4.2

v0.4.2 is not the version you want. It's ridiculously old (Jan 12, 2015) and possibly before we had even announced the company and project exist.

Run the below command,
docker exec -ti [CONTAINER ID / CONTAINER NAME] reset-password
You will get a new password for the "admin" user.

Related

How to get Docker image to run on Mac M1

I'm trying to launch SQL Server for a technical test on my Macbook. Docker seemed to be best solution.
Tried using instructions from https://database.guide/how-to-install-sql-server-on-an-m1-mac-arm64/
Installed Docker okay.
Then tried to use:
sudo docker run --cap-add SYS_PTRACE -e 'ACCEPT_EULA=1' -e 'MSSQL_SA_PASSWORD=bigStrongPwd' -p 1433:1433 --name sqledge -d mcr.microsoft.com/azure-sql-edge
But when I tried to test the Docker using:
docker ps
The result was this:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
What's gone wrong?

Chmod permission issue when running a docker container

I'm trying to run a simple-ca container (https://github.com/jcmoraisjr/simple-ca) in docker (running in a fresh install of ubuntu 18.04.4) but every time I run the docker command
docker run --name simple-ca -p 80:8080 -p 443:8443 -e CERT_TLS_DNS=ca.mycompany.com -e CA_CN=MyCompany-CA -v /var/lib/simple-ca/ssl:/ssl quay.io/jcmoraisjr/simple-ca:latest
I get the error
chmod: private: Operation not permitted
I have already granted systemd-network ownership of the folder /var/lib/simple-ca/ and ran the command
/bin/bash -c 'chown $(docker run --rm quay.io/jcmoraisjr/simple-ca id -u lighttpd) /var/lib/simple-ca/ssl'
to grant lighthttpd rights on the SSL folder
Anyone have any idea on what may have went wrong?
It was a permission issue that caused the container to fail to start. I had to remove the folder /var/lib/simple-ca and let the systemd startup re-create it with Lighttpd user id.
Once that was done, I used the container console access to directly edit the CA config files and the whole simple-ca was working as expected.

login DN and password for osixia/phpLDAPAdmin docker image

I am just getting started with LDAP. I downloaded the osixia openldap docker image and the phpLDAPAdmin:
OpenLDAP
LDAPAdmin
I created the containers this way:
docker run --name ldap -p 389:389 -p 689:689 -e LDAP_DOMAIN=localhost -e LDAP_ORGANISATION=MyOrganisation -e LDAP_ADMIN_PASSWORD=mypw -v D:\docker\LDAP\ldap:/var/lib/ldap -v D:\docker\LDAP\slapd:/etc/ldap/slapd.d -d osixia/openldap
docker run -p 6443:443 --env PHPLDAPADMIN_LDAP_HOSTS=172.17.0.4 --detach osixia/phpldapadmin
It seems to have worked: I can open the admin console and I can connect to LDAP from keycloak.
What I don't understand is, how do I log into the phpLDAPAdmin. What is the
Login DN and password? Password is mypw in this cas I guess, but the login DN?
phpLDAPadmin user name must be something like this.
cn=admin,dc=first_part_of_the_domain,dc=second_part_of_the_domain,dc=third__part_of_the_domain
as an example, cn=admin,dc=example,dc=mail,dc=com

pact-broker docker image is not running after restarting docker machine

I am using Postgres image and past broker image in my docker machine for setting up pact broker.
here are 4 steps that have mentioned :
1.$ docker run --name pactbroker-db -e POSTGRES_PASSWORD=ThePostgresPassword -e POSTGRES_USER=admin -e PGDATA=/var/lib/postgresql/data/pgdata -v /var/lib/postgresql/data:/var/lib/postgresql/data -d postgres
2.$ docker run -it --link pactbroker-db:postgres --rm postgres sh -c 'exec psql -h "$POSTGRES_PORT_5432_TCP_ADDR" -p "$POSTGRES_PORT_5432_TCP_PORT" -U admin'
3.
CREATE USER pactbrokeruser WITH PASSWORD 'TheUserPassword';
CREATE DATABASE pactbroker WITH OWNER pactbrokeruser;
GRANT ALL PRIVILEGES ON DATABASE pactbroker TO pactbrokeruser;
4. docker run --name pactbroker --link pactbroker-db:postgres -e PACT_BROKER_DATABASE_USERNAME=pactbrokeruser -e PACT_BROKER_DATABASE_PASSWORD=TheUserPassword -e PACT_BROKER_DATABASE_HOST=postgres -e PACT_BROKER_DATABASE_NAME=pactbroker -d -p 80:80 dius/pact_broker
after running this 4 command when I am opening Hal browser in my local system it is working pretty fine. Now I am stopping 2 docker containers pactbroker-db and pactbroker and stopping docker machine.
After sometime I am restarting docker machine and starting the containers by
$docker start pactbroker-db and $docker start pactbroker .
containers are getting started but when opening HAL browser I am getting the error "We're sorry, but something went wrong." screenshot attached.
Is there something wrong when I am starting the docker 2nd time?enter image description here
This has been resolved by using container given in https://github.com/DiUS/pact_broker-docker and using proper environment variables in docker-compose.yml of this project.

cannot run container after commit changes

Just basic and simple steps illustrating what I have tried:
docker pull mysql/mysql-server
sudo docker run -i -t mysql/mysql-server:latest /bin/bash
yum install vi
vi /etc/my.cnf -> bind-address=0.0.0.0
exit
docker ps
docker commit new_image_name
docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=secret -d new_image_name
docker ps -a STATUS - Exited (1)
Please let me know what I did wrong.
Instead of trying to modify an existing image, try and use (for testing) MYSQL_ROOT_HOST=%.
That would allow root login from any IP. (As seen in docker-library/mysql issue 241)
sudo docker run --name mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=123456 -e MYSQL_ROOT_HOST=% -d mysql/mysql-server:latest
The README mentions:
By default, MySQL creates the 'root'#'localhost' account.
This account can only be connected to from inside the container, requiring the use of the docker exec command as noted under Connect to MySQL from the MySQL Command Line Client.
To allow connections from other hosts, set this environment variable.
As an example, the value "172.17.0.1", which is the default Docker gateway IP, will allow connections from the Docker host machine.

Resources