docker-compose

Different env-file but same yml with Docker Compose?

给你一囗甜甜゛ 提交于 2019-12-09 04:20:23
问题 I find it quite common that I have multiple environments (for example test and prod) but the Docker containers that I wish to start are the same in both environments. The only difference is the application configuration which I want to specify using an env-file . Since I have multiple containers and dependencies between them I want to use docker-compose. But afaik I can only specify an env-file inside the docker-compose.yml file (see docs). If this is the case then I need to clone my original

can I mount subdir of volume in docker run command

折月煮酒 提交于 2019-12-09 03:51:37
问题 I'm trying to avoid slow osxfs when using docker. So I'm running docker-sync volume container. I want to mount only subdir of this volume to another container. Current example errors out: docker: Error response from daemon: create docker-sync/www/marcopolo.front: "docker-sync/www/marcopolo.front" includes invalid characters for a local volume name, only "[a-zA-Z0-9][a-zA-Z0-9_.-]" are allowed. See 'docker run --help'. 回答1: As you've seen, docker does not currently provide a way to mount only

Trouble deploying docker on AWS with ecs-cli

我怕爱的太早我们不能终老 提交于 2019-12-09 03:06:13
问题 I have a repo on ECS, have created a cluster using ecs-cli ecs-cli configure --region=us-west-2 --profile=<MY PROFILE> --cluster=cluster-1 ecs-cli up --capability-iam --keypair=<MY KEYPAIR> but then the next step to execute the compose file is when it fails ecs-cli compose --file docker-compose.yml --project-name drafter-project service up Here's my docker-compose.yml file: version: '2' services: rabbit: image: rabbitmq hostname: rabbit1 ports: - 5672:5672 - 15672:15672 drafter: build: .

unknown error after kill did not terminate sucessfully: signaling init process caused “permission denied”\n: unknown'

怎甘沉沦 提交于 2019-12-09 01:52:57
问题 I am trying to startup or some docker containers or at least busy with the docker containers. After first installation every thing whas working perfect. and dint do any thing different than just docker-compose up down stop restart and also making some wordpress containers and PHPmyadmin and MariaDB. But now when i try to shutdown the docker container it gives me permissions denied. I have search every thing so far on the web like adding www-data to the groups or try with sudo to kill it.

Docker-Compose Persistent Data Trouble

 ̄綄美尐妖づ 提交于 2019-12-08 21:39:45
问题 I'm having trouble in configuring persistent data with Mariadb . I'm using docker-compose , with each service in a single container ( Nginx , PHP-FPM and Mariadb ). Everything is working, except Mariadb doesn't store data. Every time I restart the container, I lose all the data. Then I found out that I can use another container just to keep data, and it doesn't even have to be running. So I'm using, in Mariadb container volume_from content container. But when I do that, when I try to map the

Volume mount when setting up Wordpress with docker

蹲街弑〆低调 提交于 2019-12-08 19:49:50
问题 Quickstart: Compose and WordPress proposes the following docker-compose.yml version: '3.3' services: db: image: mysql:5.7 volumes: - dbdata:/var/lib/mysql restart: always environment: MYSQL_ROOT_PASSWORD: somewordpress MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: wordpress wordpress: depends_on: - db image: wordpress:latest ports: - "8000:80" restart: always environment: WORDPRESS_DB_HOST: db:3306 WORDPRESS_DB_USER: wordpress WORDPRESS_DB_PASSWORD: wordpress volumes: dbdata

Docker - docker-compose 'version' doesn't have any configuration options

北战南征 提交于 2019-12-08 18:37:38
问题 I am newbie in the Docker world, I spent my holiday to learn this docker (however it is much harder than Vagrant). So I use Ubuntu 16.04, I installed successfully the docker and docker-compose. I read this tutorial: Quickstart: Docker Compose and Rails But this is not working... maybe the tutorial is not fine. I have this docker-compose.yml: db: image: postgres web: build: . command: bundle exec rails s -p 3000 -b '0.0.0.0' volumes: - .:/www/html ports: - "3000:3000" depends_on: - db I got

PyCharm: Can't create remote python interpreter using docker-compose

一世执手 提交于 2019-12-08 17:51:43
问题 On attempt to create docker-compose python interpreter in PyCharm I get error: Error while parsing "/Users/belek/Projects/project/docker-composee.yml": Process docker-compose config failed. Itself docker-compose works fine. The docker-compose config command running in terminal works too. Before updating macOS and PyCharm I was using docker-compose python interpreter succesfully. Can't understand what's wrong. I created issue in JB YouTrack, but no response. PyCharm 2019.2.3 macOS Catalina 10

Microservice can not reach to Config Server on Docker Compose

只谈情不闲聊 提交于 2019-12-08 16:17:38
I have a Eureka Server, Config Server and Spring-Boot Service. I have created a docker compose file like this: version: '3' services: user-service: container_name: user-service-container image: user-service:latest build: context: ./user-service dockerfile: DockerFile hostname: user-service ports: - "8082:8082" depends_on: - postgresdb - eureka-service - config-server environment: management.context-path : /userservice hostName : user-service EUREKA_HOST: eureka-service EUREKA_PORT: 8761 config-server: container_name: config-server-container image: config-server:latest build: context: ./config

After docker-compose build the docker-compose up run old not updated containers

别说谁变了你拦得住时间么 提交于 2019-12-08 14:24:25
I use docker-compose and find following problem: When I change my code and want to rebuild dockers I use docker-compose stop docker-compose build And then I want to run system by: docker-compose up But no new version of code/containers are run but old ones. What to do? You could use, docker-compose up --build or docker-compose up --build --force-recreate I have a helper function to nuke everything so that our Continuous blah, cycle can be tested, erm... continuously. Basically it boils down to the following: To clear containers: docker rm -f $(docker ps -a -q) To clear images: docker rmi -f $