Newest 'docker-compose' Questions

Q&A for professional and enthusiast programmers

Docker data volume support on Docker Cloud

In local development you can use docker-compose to attach data volume containers to app/db containers like so: mongo: image: mongo:3 volumes: - data:/data/db ports: - 27017:...

kafka image build kompose

How do we build a kafka image and then deploy it to kubernetes through the Kompose tool? I was using this docker-compose.yml file. It works with docker-compose to build a kafka image. But when we use ...

Wget in Dockerfile, files disappear in container

In a Docker file I use wget to download file in the image. But when I use this image in a docker-compose file, the container doesn't contains the files... FROM debian:8 RUN apt-get update &...

Docker container restarting on defining an entrypoint

I'm trying to run a shell script as entrypoint in my docker container. For this, I defined an entrypoint in my Dockerfile like this abc.Dockerfile FROM ubuntu COPY abc.sh / RUN chmod +x /abc.sh ...

docker-compose stop not working after docker-compose -p <name> up

I am using docker-compose version 2. I am starting containers with docker-compose -p some_name up -d and trying to kill them with docker-compose stop. The commands exits with 0 code but the containers ...

Nginx proxy (jwilder/nginx-proxy) Connection reset by peer (502 Bad Gateway)

I have simple docker-compose.yml where I would like to be able to use nginx as a proxy to the containers. For now I have two containers admin and api which later on I want to make talking to each ...

Docker compose how to mount path from one to another container?

I've nignx container and one asset container which have all my assets build from grunt or some other tools. Now in docker compose file, i want to mount asset container's 's folder path into nginx ...

How to get an access to Magento App code which is in Docker container

I haven't managed to find the solution how to get an access to Magento App code, which is in Docker container, at my host machine to have a chance to develop in my favorite IDE. In detail, I use this ...

Containers network error when use docker with live-restore

This is my docker-compose file version: '3' services: nginx-proxy: image: jwilder/nginx-proxy container_name: nginx-proxy ports: - "80:80" volumes: - /var/run/docker....

Visual Studio 2017 stopped running docker-compose

In Visual Studio 2017 I am working on a project with 3 dotnet core projects. It was building and starting the containers using docker-compose as the startup project. Now it is giving me an error that ...

Location on Host VM that can be accessed by docker containers

I have a Java Application which will be deployed as a docker container on production VMs. As part of this application, I need to access Hadoop Cluster and fetch a file. Since Kerberos authentication ...

In docker-compose how to create an alias / link to localhost?

In my docker-compose file there is a need for several containers to know the hostname of a specific container, including this specific container. Links will not work, since a container can not link ...

Visual Studio Docker Tools how to force a container rebuild from scratch

I am using docker-compose in Visual Studio 2017 (tool version 0.41) to build two images, a ASP.NET Core API container and a PostgreSQL container. I ran the Docker-Compose project and everything worked ...

Convert Docker Compose to a service create command

As said in the title, I want to create a commando from a YML file. Unfortunately, I am unable to finde some parts, e.g. Depend_on. I already have: samle_1: image: image:0.1.0 environment: - ...

Docker compose file memory, cpu limits

I'm trying use memory and cpu in docker-compose file. I get below error code: The Compose file './docker-compose.yml' is invalid because: Unsupported config option for services.web: 'resources' My ...

PhpStorm xdebug can't find file when connection comes from docker container

I'm trying to move my Magento development environment to docker. I've started with this ready to use solution. Almost everything works properly except xdebug. I've set up PhpStorm according to this ...

Pass argument to docker compose

In my docker compose file there is a dynamic field which I'd like to generate during the running. Actually it is a string template: environment: - SERVER_URL:https://0.0.0.0:${PORT} And I want ...

How to use Haskell Stack with Docker Compose?

I am trying to use docker compose to tie together some haskell services for local development. Most of the time I'm messing around in stack ghci, running unit tests, etc, but I also need to be able to ...

Docker web panel with permissions checking

I have a server with docker. And I have two different user, for example user1, user2. User1 has service1 and user2 has service2. Is it possible right now to use some web panel to allow user1 access ...

how does docker treat child process when we send stop to pid 1

I am currently using ENTRYPOINT ["/sbs/start.sh"] in a Dockerfile. So when a container starts, start.sh is run as pid 1 and my start.sh scripts spans two more child process to pid1. My question is how ...

How to open jupyter nookbooks in docker container?

I have the following containers when running docker-compose ps: Name Command State Ports -----------------------------------------------------------...

How to pass docker arguments during docker run command or docker-compose up command

i have to create a docker container from an docker image. When the container is started using docker run or docker compose up command, i want to pass some arguments to it and those argument values ...

Gunicorn graceful stopping with docker-compose

I find that when I use docker-compose to shut down my gunicorn (19.7.1) python application, it always takes 10s to shut down. This is the default maximum time docker-compose waits before forcefully ...

docker-compose: spring-boot web service access postgres db service

In my docker-compose.yal file I define a spring-boot based web service and a postgresql database service. The web services references the db services and has an environment variable for the database ...

Docker compose best practices of packaged or bundled asset container?

i am in lots of confusion to how to achieve the following flow i've two containers nginx and asset (will have only bundled asset) so there cab be 2-3 nginx instance and few asset instances. So from ...

Unable to download docker golang image: No command specified

Newbie in docker here. I want to build a project using go language and my docker-compose.yml file has the following: go: image: golang:1.7-alpine volumes: - ./:/server/http ports: ...

docker secrets for configuration files

It is more like design pattern question for docker secrets. We have bunch of configuration properties files and almost none of them has any secret properties like user id, pass word. Should I use ...

error: unable to unlink old 'gulpfile.js' (Permission denied) while using Docker Compose for development environment

I'm developing a PHP 7.1 web application using the following: Symfony 3.2 Docker Compose 1.12.0 Ubuntu 16.04 x64 When running docker-compose up -d, my bind mounted project directory's owner and ...

Best practice for rails docker-compose db:create db:migrate

I have simple rails application with docker-compose.yml file. It consists from two containers - db container with PostgreSQL and web container with rails app. In dockerfile for web part I have such ...

Add insecure rubygems source and automatically choose 'yes' for 'Do you want to add this insecure source?' (I'm using Docker-Compose)

I am provisioning an install of a node that uses some ruby gems. In order to get the gems on my corporate network I usually add 'http://rubygems.org'. I am using Docker compose and wand to use gem ...

Set specify IP for a Docker container from docker-compose.yml

I have the docker-compose.yml file web_server: build: web_server/ ports: - "8000:8000" links: - mongo tty: true environment: SYMFONY__MONGO_ADDRESS: mongo ...

How do I translate the `docker network create` CLI options into compose format for `docker stack deploy` use?

Use-case context: I need to do some batch processesing via docker run that connects to services using the swarm overlay network. I want to use docker stack deploy to roll out the networking and ...

Docker compose up not showing console output for link

docker-compose up isn't showing the log output (stdout) for all my services. I get output when I run the container manually: $ docker run -it simple/cra-products /usr/local/bin/cra-products [Info#...

How do I expose ports in Docker on Windows 10?

I have a properly installed copy of Docker CE on my Windows 10 Pro machine. I am trying to run a simple node app using docker-compose and be able to dynamically update the code while running in ...

nodejs doesn't connect to rethinkdb with docker-compose

How run rethinkdb with nodejs on server ? Is docker-compose.yml: web: build: ./app volumes: - "./app:/src/app" ports: - "8000:8000" - "8080:8080" - "28015:28015" - "29015:...

How to run Consul on docker with initial key-value pair data?

I am trying to spin a Consul server on docker container and use it as config server for my SpringBoot cloud application. For that I want to have some pre-configured data(Key-Value pairs) in Consul. ...

Docker-compose scale command from within container

I am using docker compose to build a topology which has service X and Y, is it possible to scale service X from within service Y (a container)?

docker-compose as vagrant provider?

We are currently using Docker to containerise our applications for the purpose of having our CI server running tests and (soon) deployment to production. We are using vagrant to keep a consistent ...

Docker DNS Not Seeing External Servers

I've been recently having hostname resolving issues with Docker Version 17.04-CE and I'm not sure what is causing it. I currently have docker setup not to use any options for when running, but lately ...

docker compose file not working: replicas Additional property replicas is not allowed

docker version: 17.03.1-ce Trying to get the docker-compose.yml working from the getting started tutorials. version: "3" services: web: image: tuhina/friendlyhello:2.0 deploy: ...

Sample docker compose setup for web application devops

I am building a website which consists of several backend and frontend components. I want to use docker compose to deploy to a production server. Here are the various components: Backend C++ code ...

Docker compose v3 named volume & node_modules from npm install

Using compose v3. In the build I copy package.json and run npm install into /var/www/project/node_modules I dont add any code in the build phase. In compose I add volumes - ./www:/var/www/...

MongoDB doesn't work with Symfony app in Docker

I have a Symfony app for a REST API that run in Docker container. All routes works but when I try to access a route for add information in database or extract information from database I receive the ...

Set cluster name of elasticsearch in docker-compose

I am running elasticsearch service with docker-compose. I need to specify custom cluster name. As I found in this github ticket, I can pass a custom cluster name in es.cluster.name property. This ...

How can i create a superuser for elasticsearch from docker-compose

i am using docker-compose version2, and in my yml file under services, i have the following. How can i disable default usernames elasticsearch docker image ships with ( i.e elastic:changeme e.t.c ), ...

a multi container app ; docker compose [on hold]

i'm working on a security project , and i need simulate to a multi-container application using docker and apply the PCI-DSS rules on this app , the application composed of 3 websites , an e-commerce ...

Docker-compose not passing environment variable to container

I am using Docker 17.04.0-ce, build 4845c56 with docker-compose 1.12.0, build b31ff33 on Ubuntu 16.04.2 LTS. I simply want to pass an environment variable and display it from my script running in a ...

Can't connect container docker from Macos

I'm having problem when connect to container from my local on Macos. docker inspect show: "IPAddress": "172.18.0.2" docker-machine ip default show: 192.168.99.100 I have implemented this command ...

502 http error from nginx+letsencrypt proxy on docker

I have a machine with Ubuntu 16.04 on it. I tried to setup nextcloud in a container proxied via nginx and encrypted with letsencrytp. Now when I want to access the website I get an 502 bad gateway ...

Enable EXIF support when running Wordpress Docker container

I’m trying to run a Wordpress site inside the official Wordpress Docker container. The Wordpress site that I’ve built relies on using exif_read_data to extract meta information from photos. I ...
Translating... 0%