Newest 'docker-compose' Questions

Q&A for professional and enthusiast programmers

Docker run override entrypoint with shell script which accepts arguments

I have entrypoint shell script which accepts arguments -a -b. I have working docker-compose.yml file where I override tomcat's entrypoint with instruction: entrypoint: /usr/local/tomcat/entrypoint....

Run nodejs application on subpath with haproxy

I'm trying to serve my nodejs / express web application on a subpath, using haproxy. Without haproxy my app is running on http:localhost:3000. I want it to run on http://localhost/test. I tried ...

Docker in Docker docker-compose daemon not running on host. Windows 10

Running docker in docker image (dind), on windows 10. Powershell is run as admin. I have a manager and a worker up container up through docker-compose.yml file. The compose yaml file is as such: ...

Rails and Docker for large web apps [on hold]

I'm currently working on a Rails webapp, never been in production, it would give to the users some geolocated information, so a large number of request per seconds.. I recently discovered that Rails ...

docker-compose postgresql persitent local storage

How can I setup postgresql in docker to be persistent into a local folder? version: '2' services: db: image: postgres:9.6.1-alpine ports: - "5432:5432" environment: - ...

Docker-compose: ERR_EMPTY_RESPONSE

If I launch a Docker container by first creating the image and then running it (docker build --rm -t myApp + docker run -p 80:80 -P -d myApp), everything works fine. But, when I do the same with ...

Docker not able to connect via host IP or localhost

I have created a docker image which runs kafka inside the container. I have also done port mappings in the docker-compose.yml for mapping the host ports with container ports. After bringing up the ...

Docker-compose depend_on

I have a mongodb service and a test service running with docker-compose: services: mongo: image: myrepo/mongo ports: - "27017:27017" test: depends_on: - mongo image:...

can I mount subdir of volume in docker run command

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: ...

kubernestes PersistentVolumeClaim is not bound

I'm new to Kubernetes. I have a Kurbenetes up and running on AWS working correctly. I'm trying to deploy this sample application: https://github.com/mikechernev/dockerised-php I can run the project ...

How to setup Docker for a polyglot microservice-based application?

Working on a larger-than-usual project of mine, I am building an web application that will talk to several APIs of mine, each written in its own language. I use two databases, one being MariaDB and ...

Mount a volume in docker-compose conditionally

I have a docker-compose.yml configuration. One of the containers there is a Tomcat server and it has some default .war file deployed in webapps directory. I want to have the ability to pass (override)...

Redirect container remote calls to other host

I want to test my app in docker isolated. I don't want to change app code for this. My app calls remote server (www.example.com e.g.). I want to mock this server (www.example.com). I want create my ...

Docker compose with Drone and Gitlab, Gitlab errors “The redirect URI included is not valid.”

I'm investigating CI technologies so I thought I would set up Drone with Gitlab locally using Docker compose. Here is the docker-compose.yml: version: "2" services: example_gitlab: image: ...

nginx and docker: route all requests from each service properly

I have several services running in docker (using docker-compose), each in its own container. I am using nginx as the proxy server. partial nginx.conf: upstream a_servers { server a:8080; } ...

Docker-compose container using host DNS server

I'm running several containers on my "Ubuntu 16.10 Server" in a "custom" bridge network with compose 2.9 (in a yml version 2.1). Most of my containers are internally using the same ports, so there is ...

How to launch app with webpack for production in Docker container?

Thank you for viewing this page. Hope you will leave any comment, which can be helpful for me. I have an app with React + Redux and Webpack (with Webpack dev server ofcourse). I've tried several ...

Simple Flask application with debug set to True is not reloading in Docker?

New to Docker, I have my Python/Flask service working trial-api but it does not reload the files when I change the code like it normally does (when not used through Docker.) Meaning, I've got to ...

Docker and Vagrant connection

I have 2 apps set locally. One (app_v) is running on vagrant, and I can access it on browser with http://192.168.50.5:3000/. Second (app_d) is running on docker-compose, and I can access it on ...

docker-compose got error when bringing up nodejs application docker container

I am new to docker and I am trying to use docker-compose to start node application container and I keep getting error when it starts node application and I don't understand how the path at current ...

What config option links a Wordpress database to its files?

I'm trying to restore my online Wordpress site to my localhost. Install This little Dockerfile successfully downloads & runs Wordpress in a container on my machine: version: '2' services: db: ...

Spark standalone cluster on docker in network “bridge”

My problem is for the connection between slaves from other node to the master. I have 3 nodes setup as follow : 1 node with the master and 1 worker launched on the same docker 2 node with 1 worker ...

Mystery of the Restarting Docker Container

I have noticed a pattern that is easily reproducible but I can not answer why for the life of me its happening. For some reason if I use the command docker-compose kill (to kill all the containers), ...

docker-compose network creation kicks me out of ssh

I need help understanding my networking logs due to docker-compose networking. I'm ssh'd into a VM, and I have two projects with docker-compose. The first is launched simply with docker-compose up. ...

Docker-compose, deploy war to Tomcat, run oracle service

Given I have following scenario: I want to deploy web application to Tomcat, which connects to the oracle database and display data to the user What I will need is the following: Docker compose yml ...

PM2 Won't Start Inside Docker

Trying to get a node app running and reloading from a volume inside docker, using docker-compose. The goal is to have the app running inside the container, without losing the ability to edit/reload ...

Use docker-compose with multiple repositories

I'm currently struggling with the deployment of my services and I wanted to ask, what's the proper way when you have to deal with multiple repositories. The repositories are independent, but to run in ...

How to obtain container Ip from another container?

I have the following docker-compose file: version: '2' services: node: build: ./node/ ports: - "3000:3000" volumes: - ~/src/api:/code links: - postgres ...

Docker compose builds image in one directory but not in another

I have docker-compose file which build and image based on Dockerfile. When I run docker-compose build service_name it hangs on Building service_name. However, when I copy all files in another ...

Running private_pub with docker

I have an app that uses the private_pub gem (which uses faye) for sending notifications to users. The problem is that I'm trying to deploy using docker and docker-compose (since there's quite a few ...

docker-compose base version as build attribute

As shown on in the official doc: https://docs.docker.com/compose/compose-file/#args and on this post: docker-compose 1.6 "args" attribute on "build", you can pass arguments from ...

Share connection details with container and host

My docker-compose.yml contains application container and database container app: links: - db db: image: postgres ports: - 5003:5432 Let's say that during development I want to start ...

Livereload of ionic 2 with docker-compose instance does not work

In a project I have this Dockerfile: FROM node:6.9.4 RUN npm install -g cordova@4.2.0 ionic@2.2.1 ENV DOCKER_CONTAINER_APP=/web-app RUN mkdir -p $DOCKER_CONTAINER_APP ADD . $DOCKER_CONTAINER_APP ...

Docker Swarm Service Clustering

I want to use docker-compose with Docker Swarm (I use docker version 1.13 and compose with version: '3' syntax). Is each service reachable as a "single" service to the other services? Here is an ...

docker-compose referencing wrong ports

I am running multiple docker-compositions on one host (identical images for different usecases). For that reason I use different HTTPS (+REST) ports the compositions are available remotely under. ...

Not all services are registered in Consul with Registrator

I have Docker and Docker Compose on my machine and I have a docker-compose.yml file. Inside of this file I define two services like so ... nginx: build: context: ./nginx-proxy' ...

Docker-compose : volumes and user

I try to change the user who mount my Docker volumes but it's the "root" user who does it instead of "safe-user". Knowing that if I do a "chown -R /var/www" in the Dockerfile this one does not work ...

Docker-compose: flag -p equivalence

Let's suppose I have two web services: A and B. Both running on Apache. I want them to be accesible from different ports from my host: A from port 88 and B from port 89. I can do it manually (by ...

npm ERR! Failed when make ionic serve command (ask for checking version of node.js and npm installed)

I am trying to create a docker environement (that I wish to use with git and my team) with ionic framework 2. I have a project directory named ionic-boilerplate. In this directory I have an ionic app ...

How to pass in information from the host to docker

I am using docker-compose to manage the development environment. One component is an Apache reverse proxy. I set-up httpd-vhosts.conf to include a vhost that actully proxies the request back to the ...

How to serve couple containers with domain names with Docker NGINX image

I need to host multiple sites with my docker-machine in future, but know i'm trying to launch it on localhost. The main purpose is to get certain site, of course I need to start with my /etc/hosts ...

Docker, Nginx and PHP7: ERROR 111 Connection refused while connecting to upstream

I run a NGINX-PHP7-COMPOSER image that works well but when using Slim Framework I had to change Nginx's default config to make the URL rewrites work. And now it show this error in the logs: 2017-...

Not able to Pull from Docker Although image is present in docker hub

There has one image and it is public in my dockerhub account I have logged in from my console then try following command but not able to pull the image rajarshi@rajarshi-X200CA:~$ sudo docker pull ...

Error using docker-compose down

I found such command as docker-compose down on docker website, but when I try to use it i get an error. No such command: down Commands: build Build or rebuild services help ...

How can I copy a file from one folder to another folder within a container in Docker?

I already found ways for moving file between host and container but was not able to figure out on how to moves files within same container using YML. Can some one help me on this?

How to Increase the Speed of Docker Builds While Using Mounted Volumes

Docker is slow writing to the host file system when using volumes. This makes tasks like npm install, in NodeJS, incredibly painful. How can I exclude the node_modules folder from the volume so the ...

Pass environment variables from docker-compose to container at build stage

I am trying to create configuration for several environment with a single Dockerfile, several docker-compose files and several envoronment_variables files. I need it to use a specific file with python ...

Unable to load balance using Docker, Consul and nginx

What I want to achive is load balancing using this stack: Docker, Docker Compose, Registrator, Consul, Consul Template, NGINX and, finally, a tiny service that prints out "Hello world" in browser. So, ...

Using docker-compose to start web and backend. How can I get the IP of backend from web?

I'm stuck with docker-compose 1.5.2 as I'm using CircleCI. web: build: . ports: - "5000:5000" links: - backend backend: image: node-backend ports: - "5002:5002" I'm not able ...

Docker workflow during development

While I work on setting up a network of linked docker containers, I find myself facing an issue that when I do docker run A ; docker run --link A:A B, and then later change A, I have to stop, rm and ...
Translating... 0%