I need some command to create odoo and postgres containers but using -e POSTGRES_PASSWORD_FILE=... like this:
docker run -p 5000:5432 -e POSTGRES_PASSWORD_FILE=... --name db postgres:9.6
docker run -tid -p 9000:8069 -v $path/addons:/mnt/extra-addons --name od --link db:db -t odoo:12
odoo image accepts a PASSWORD env
PASSWORD: The password of the postgres role with which Odoo will
connect. If you used a postgres container, set to the same value as
POSTGRES_PASSWORD. Defaults to odoo.
docker run -p 5000:5432 -e POSTGRES_PASSWORD_FILE=/run/secrets/postgres-passwd --name db postgres:9.6
# or
docker run -p 5000:5432 -e POSTGRES_PASSWORD=weak_pwd --name db postgres:9.6
docker run -tid -p 9000:8069 -e PASSWORD=weak_pwd -v $path/addons:/mnt/extra-addons --name od --link db:db -t odoo:12
Related
When I use this command:
docker run -d --hostname rabbit1 --net=host --name myrabbit1 -p 4369:4369 -p 15672:15672 -p 5672:5672 -e RABBITMQ_DEFAULT_USER=admin -e RABBITMQ_DEFAULT_PASS=admin -e RABBITMQ_ERLANG_COOKIE='rabbitcookie' rabbitmq:3.6.9-management
The container is started but there is no log file. If I want to see the rabbit logs inside the container, how should I modify the above command?
I am tring to connect multiple Debezium connectores for a mysql database and my configurations are as follows.
sudo docker run -it --name zookeeper -p 2181:2181 -p 2888:2888 -p 3888:3888 debezium/zookeeper:1.5 &
sudo docker run -it --name kafka -p 9092:9092 --link zookeeper:zookeeper debezium/kafka:1.5 &
sudo docker run -it --name connect -p 8083:8083 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses --link zookeeper:zookeeper --link kafka:kafka debezium/connect:1.5 &
sudo docker run -it --name connect1 -p 8084:8084 -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses --link zookeeper:zookeeper --link kafka:kafka debezium/connect:1.5 &
but when i tring to run second connector...following error occurred.
ERRO[0000] error waiting for container: context canceled
Can anyone help me with this please.
You're not running any connectors, only containers for workers.
One Kafka Connect worker can be used to submit more than one connector task via the HTTP server on port 8083
Regarding the commands shown, you do not need multiple containers unless you are trying to create a Connect worker cluster
In order to do so, they need the same topics and the same group id.
You'd also want -p 8084:8083 since you've not changed the server port. Also, rather than using &, you can do docker run -d, but using Docker Compose would make more sense here
still pretty new to docker and i could use some help. I am trying to setup some docker containers precisely the redash appplication. Here is my working code:
sudo docker network create redash_default
sudo docker container run --name redis --network redash_default -d redis:4.0-alpine
sudo docker container run --name postgres --network redash_default --env-file /opt/redash/env -v /opt/redash/postgres-data -d postgres:9.5.21-alpine
sudo docker container run --rm -p 5000:5000 -e REDASH_WEB_WORKERS=4 --name server --network redash_default --env-file env redash/redash:7.0.0.b18042 create_db
sudo docker container run -d --restart always -p 5000:5000 -e REDASH_WEB_WORKERS=4 --name server --network redash_default --env-file env redash/redash:7.0.0.b18042
sudo docker container run -d --restart always -e QUEUES=celery -e WORKERS_COUNT=1 --name scheduler --network redash_default --env-file env redash/redash:7.0.0.b18042
sudo docker container run -d --restart always -e QUEUES=scheduled_queries,schemas -e WORKERS_COUNT=1 --name scheduled_worker --network redash_default --env-file env redash/redash:7.0.0.b18042
sudo docker container run -d --restart always -e QUEUES=queries -e WORKERS_COUNT=2 --name adhoc_worker --network redash_default --env-file env redash/redash:7.0.0.b18042
sudo docker container run -d --restart always -p 80:80 --link server:redash --name nginx --network redash_default redash/nginx:latest
however i am only allowed to run the containers in read-only mode which is breaking the application. Only redis seemed to like the read-only mode so i thought about mounting an external persistent disk on the instance /dockervol/ where the apps can be given RW access but i cant seem to get that work either. here is something i have tried for example with nginx
docker container run -p 80:80 --mount type=bind,source=/dockervol/nginx,target=/etc/nginx – read-only --link server:redash --name nginx --network redash_default redash/nginx:latest
i get an error
nginx: [emerg] open() “/etc/nginx/nginx.conf” failed (2: No such file or directory)
My question is how do i get all the containers to work in read-only mode with a persistent volume without breaking the application.
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
I am running restcomm docker container in AMI where. I have created the container by default setting.
Using the default values:
docker run --name=restcomm -d -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm:7.3.0
i have not been able to access the RVD by
http://x.x.x.x:8080
Can you try the command mentioned in http://www.telestax.com/rapid-webrtc-application-development-with-restcomm-and-docker/ ie
docker run –name=restcomm -d -e STATIC_ADDRESS=”YOUR_HOST_IP_ADDRESS_HERE” -p 8080:8080 -p 5080:5080 -p 5082:5082 -p 5080:5080/udp -p 65000-65535:65000-65535/udp gvagenas/restcomm