docker-compose

Docker-Compose: how to mapping volume from host into container?

懵懂的女人 提交于 2019-12-08 04:32:32
问题 The Problem: I'd like to share a folder from the docker host with a specific container using docker-compose. A container running MongoDB shall place its data files into /var/lib/mongodb, but this folder shall be a mount to the hosts folder /var/lib/mongodb. But it still remains an own local directory within the container, not the shared one from the host. Sometimes it also ends up with the following warning: WARNING: Service "mongodb" is using volume "/var/lib/mongodb" from the previous

How to pass variable as attribute to xml configuration file in Wildfly with Docker

╄→гoц情女王★ 提交于 2019-12-08 04:13:17
I'm trying to pass values from docker-compose.yml file to Wildfly configuration dynamically. I want to have flexibility of mail configuration - just for quick change of addres, or username, or port.. In this case, I tried to do that by forwarding environment variables from docker-compose.yml, by dockerfile as arguments "-Dargumentname=$environmentvariable. Currently wildfly interupts on start with error: [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 45) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "mail"), ("mail-session" => "default") ]) -

Unable to connect to Redis from Docker

落爺英雄遲暮 提交于 2019-12-08 04:05:23
问题 Something simillar (Unable to connect to MYSQL from Docker Instance and redis connect timeout to remote server in a docker and Calling redis-cli in docker-compose setup) I tried to run for the Redis on Docker. I start the Docker service like this: docker run --name some-redis -d redis Output: docker run --name some-redis -d redis d2ea8a77ba543b3e85020de6bc450e0d50ce9f60e0307e52fd4ae394bd29722 I re-verified using docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES d2ea8a77ba54

Linking nginx and php-fpm container together for fast interaction in docker prod

余生颓废 提交于 2019-12-08 02:05:48
问题 For my symfony project i am using a classic nginx/mysql/php-fpm image combination. For both (fpm and nginx) i use a local mount to the docker container to make the source code available. So that is very slow, but bearable with nfs extension for docker. In prod environment i prepare the images so, that the local src code is copied to the php-fpm image and a named volume is afterwards created in the docker compose file for the nginx container. So i can connect php-fpm and nginx to make them

Why are docker-compose “environment” variables treated differently to environment variables defined via the -e flag using docker run?

…衆ロ難τιáo~ 提交于 2019-12-08 01:03:59
问题 Looking at a PostGIS Docker image, the instructions indicate to use via the following docker run command: docker run --name some-postgis -e POSTGRES_PASSWORD=mysecretpassword -d -P mdillon/postgis Specifically, when running this command I see that the -e flag is used (i.e. that the environment variable POSTGRES_PASSWORD is set. And I can test that I cannot login to the PostgreSQL server unless I specify that password. I'm trying to run this Docker image using docker-compose , but I'm finding

使用Docker启动Kafka-Manager

只愿长相守 提交于 2019-12-07 23:26:00
Docker安装Kafka-Manager(docker-compose.yml) 前置条件 请先安装Docker 创建docker-compose.yml # Docker compose to have Zookeeper, Kafka, and Kafka Manager running for development. # Provided by @chris-zen zookeeper: image: confluent/zookeeper ports: - "2181:2181" kafka: image: wurstmeister/kafka:0.9.0.0-1 ports: - "9092:9092" links: - zookeeper:zk environment: - KAFKA_ADVERTISED_HOST_NAME - KAFKA_ADVERTISED_PORT=9092 - KAFKA_DELETE_TOPIC_ENABLE=true - KAFKA_LOG_RETENTION_HOURS=1 - KAFKA_MESSAGE_MAX_BYTES=10000000 - KAFKA_REPLICA_FETCH_MAX_BYTES=10000000 - KAFKA_GROUP_MAX_SESSION_TIMEOUT_MS=60000 - KAFKA_NUM

Spring Boot, PostgreSQL, and Docker - Connection Refused whil Running in Container

。_饼干妹妹 提交于 2019-12-07 23:22:28
问题 I am attempting to build a "service" consisting of a Spring Boot application and PostgreSQL database. I have been able to access the database (running in a container) from the Spring Boot app while the Spring Boot application was running on my local machine. Now, when I attempt to move the Spring Boot application to a container, I am received the following error: inventory_1 | 2018-01-20 18:43:06.108 ERROR 1 --- [nio-8080-exec-1] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for

Docker compose and hostname

两盒软妹~` 提交于 2019-12-07 23:05:24
问题 I have a compose file with 2 services (containers) named "web" and "db". { "version": "2", "services": { "web": { "image": "nodejs:latest", "ports": ["80"] }, "db": { "image": "mysql:latest", "ports": ["3306"] } } } I am able to access db container from web container by using "db" as ip for my database. What advantage do i have by using "hostname" in the compose file as shown below? { "version": "2", "services": { "web": { "image": "nodejs:latest", "hostname": "web", "ports": ["80"] }, "db":

Unable to run Docker Toolbox on windows 10 home even after enabling virtualization from BIOS settings

旧街凉风 提交于 2019-12-07 20:37:13
问题 On running docker quickstart terminal I get the following error: Running pre-create checks... Error with pre-create check: "This computer doesn't have VT-X/AMD-v enabled. Enabling it in the BIOS is mandatory" Looks like something went wrong in step ´Checking if machine default exists´... Press any key to continue... I have tried everything from enabling the virtualization from the bios setting to reinstalling the toolbox but this error doesn't seem to go away. I read that since Windows 10

Running out of inodes on a docker volume

北战南征 提交于 2019-12-07 20:03:49
问题 I have the following docker-compos.yml file: web: build: . ports: - "4200:4200" - "35729:35729" volumes: - ..:/code - ../home:/home/dev which maps the 2 volumes above. When I login into my VM and run df -i i see Filesystem Inodes IUsed IFree IUse% Mounted on none 1218224 509534 708690 42% / tmpfs 256337 18 256319 1% /dev shm 256337 1 256336 1% /dev/shm tmpfs 256337 11 256326 1% /sys/fs/cgroup none 1000 0 1000 0% /code none 1000 0 1000 0% /home/dev /dev/sda1 1218224 509534 708690 42% /etc