Change the password that was set when starting docker - docker

I runned with the following parameters:
docker run --restart always -v /srv/dav:/var/lib/dav \ -e AUTH_TYPE=Basic -e USERNAME=webdav -e PASSWORD=******* \ -e SSL_CERT=selfsigned --publish 443:443 -d k3vmcd/webdav
How can I change the password for an already running container?
-e AUTH_TYPE=Basic -e USERNAME=webdav -e PASSWORD=******* \
I tried to restart the container with a different password, but the already created container did not change the password

Related

starting a NIFI container with my template/flow automatically loaded

i want to create a NIFI container and pass it a template/flow to be loaded automatically when the container is being created (without human intervention).
couldn't find any volumes/environments that are related to it.
i tried using (suggested by chatGPT):
docker run -d -p 8443:8443 \
-v /path/to/templates:/templates \
-e TEMPLATE_FILE_PATH=/templates/template.xml \
--name nifi apache/nifi
and
docker run -d -p 8443:8443 \
-e NIFI_INIT_FLOW_FILE=/Users/l1/Desktop/kaleidoo/devops/files/git_aliases/flow.json \
-v /Users/l1/Desktop/kaleidoo/docker/test-envs/flow.json:/flow.json:ro \
--name nifi apache/nifi
non of them worked, and i couldn't find data about NIFI_INIT_FLOW_FILE and TEMPLATE_FILE_PATH in the documentation.

Enable fine grained on keycloak with docker

I have set up keycloak using docker, my problem is that I need to do some modifications on the clients that need the fine grained to be enabled. I have read the documentation and i know I should use the parameter -Dkeycloak.profile=preview or -Dkeycloak.profile.feature.admin_fine_grained_authz=enabled. My problem is that I tried to use that on my docker execution command, but with no luck
docker run --rm \
--name keycloak \
-p 80:8080 \
-e KEYCLOAK_USER=admin \
-e KEYCLOAK_PASSWORD=[adminPass] \
-e PROXY_ADDRESS_FORWARDING=true \
-e DB_VENDOR=MYSQL \
-e DB_ADDR=[SQL_Server] \
-e DB_DATABASE=keycloak \
-e DB_USER=[DBUSER] \
-e DB_PASSWORD=[DB_PASS] \
-e JDBC_PARAMS=useSSL=false \
-e -Dkeycloak.profile.feature.admin_fine_grained_authz=enabled \
jboss/keycloak
any help?
It is documented in the Docker image readme https://hub.docker.com/r/jboss/keycloak
Additional server startup options (extension of JAVA_OPTS) can be configured using the JAVA_OPTS_APPEND environment variable.
So in your case:
-e JAVA_OPTS_APPEND="-Dkeycloak.profile=preview"
Guess you might need to pass the environment variables to the JVM when starting the Wildfly containing the Keycloak WAR. There is a runner shell script that starts when launching the container. You need to add your environment variables to that call.

How to set QuestDB configuration defaults when using in Docker?

I spin QuestDB in docker container as suggested in the docs
docker run -p 9000:9000 \
-p 9009:9009 \
-p 8812:8812 \
-p 9003:9003 \
questdb/questdb
How can I override number of threads in the worker pool default configuration for the container from 2 to 8?
If there is a property to override from configuration list there is a way to specify it as environment variable for the container with QDB_ prefix and _ instead of . in the variable name. In case of shared worker count it should be
docker run -p 9000:9000 \
-p 9009:9009 \
-p 8812:8812 \
-p 9003:9003 \
-e QDB_SHARED_WORKER_COUNT=8 \
questdb/questdb

how to fix i think some thing wrong with the code

what wrong with it ?
do i do something wrong in here ?
docker stop blockchain-service
docker rm blockchain-service
docker run --name blockchain-service -d
--restart always -v ~/ethereum/:/var/run/ethereum -e
GETH_IPC_PATH=/var/run/ethereum/ethereum-data.ipc -e
SQS_QUEUE_URL=https://sqs.us-east-1.amazonaws.com/407151891480/geth-mainnet-transactions -e
MASTER_WALLET_ADDRESS=0xMASTER_KEY --log-opt max-size=100m --log-opt max-file=3 -e
SQS_PAYMENT_REQUESTS_QUEUE_URL=geth-mainnet-payment-requests -e
FAKE_USER_WALLET_PRIVATE_KEY=PRIVATE_KEY -e
FAKE_USER_WALLET_PUBLIC_KEY=0xPUBLIC_KEY -e
AWS_ACCESS_KEY_ID=ACCESS_KEY -e
AWS_SECRET_ACCESS_KEY=ACCESS_KEY -e
ENV=prod -e
EXPECTED_TRANSACTION_AMOUNT=1000000000000000000000 -e
DB_PORT=5432 -e
DB_NAME=endordb -e
DB_USER=endor_admin -e
DB_HOST=MY_DB.us-east-1.rds.amazonaws.com -e
DB_PASSWORD=NO_PASSWORD -e
SLACK_TOKEN=xoxp-14092887333-345643415810-495051526626-e
2e61b404d4be9b0a7002ae01e25991a 407151891480.dkr.ecr.us-east-1.amazonaws.com/blockchain-service
Maybe you are missing an env variable after the SLACK_TOKEN?
I recommend to put all your variables in an env file and then use "--env-file

Wordpress Access denied for user root with MySQL container

I'm trying to make MySQL instance available to other containers, I'm following this documentation mysql and this wordpress official documentation, I get this error
MySQL Connection Error: (1045) Access denied for user 'root'#'172.17.0.3' (using password: YES)
Code for MySQL instance
docker run -d --restart on-failure -v hatchery:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=Kerrigan \
-e MYSQL_DATABASE=zerglings --name spawning-pool mysql
Code for WordPress instance
docker run -d --name lair -p 8080:80 --link spawning-pool:mysql wordpress
How can I successfully link wordpress and mysql containers?
you need to pass in your database connection credentials via environment variables to wordpress:
docker run -d --name lair -p 8080:80 --link spawning-pool:mysql \
-e WORDPRESS_DB_HOST=mysql \
-e WORDPRESS_DB_NAME=zerglings \
-e WORDPRESS_DB_PASSWORD=zerglings wordpress
I have solved it by deleting everything and try starting it up again.
docker rm -v spawning-pool # -v Remove the volumes associated with the container
Remove the volume too
docker volume rm hatchery
Then I created the containers again
# create the volume
docker volume create hatchery
# MySQL instance
docker run -it -d --restart on-failure -v hatchery:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=Kerrigan \
-e MYSQL_DATABASE=zerglings --name spawning-pool mysql
# creating wordpress
docker run -d --name lair -p 8080:80 --link spawning-pool:mysql \
-e WORDPRESS_DB_HOST=mysql -e WORDPRESS_DB_NAME=zerglings
-e WORDPRESS_DB_PASSWORD=Kerrigan wordpress

Resources