docker-compose scale with sticky sessions

I have a webserver that requires websocket connection in production. I deploy it using docker-compose with nginx as proxy. So my compose file look like this: version: ‘2’ services: app: restart: always nginx: restart: always ports: – “80:80″ Now if I scale “app” service to multiple instances, docker-compose will perform round robin on each call […]

What permissions do I need to enable for Docker volumes to work?

Let’s say I have a Docker container that holds some data. I want this data to persist – if the container is stopped, removed, upgraded etc. I still want the data to be in an accessible location on the host OS filesystem. Currently, my solution is to create a directory /srv/service-name on my host (I […]

How to execute Docker query command on all containers?

In docker I can make docker inspect -f “{{ .NetworkSettings.IPAddress }}” CONTAINER to run command on a particular container. What I need is to do something like docker inspect -f “{{ .NetworkSettings.IPAddress }}” all or docker inspect -f “{{ .NetworkSettings.IPAddress }}” * to run a command on all containers, not mentioning their names explicitly? It […]

Batch install RPM packages from .tar.gz file on CentOS

How can I install a large group of .rpm packages that are compressed in a .tar.gz file? Context: I am using Docker to build a CentOS 7 container and was provided a .tar.gz file containing many .rpm packages. These packages are dependencies for a program I would be running within the container. I would like […]

Configuring kubectl against remote clusters

I followed the Kubernetes docs for setting up a single node cluster as a Docker container. I now have Kubernetes running on a remote Linux VM (say, I then downloaded and installed kubectl locally on my Mac laptop. I can run kubectl version and it verifies I have installed the correct version. I then […]

PyCharm remote debug in a docker container

I’m having an hard time trying to figure out how to setup a remote debug of a python app (Flask) running in a Docker container. Specifically I’m using docker-compose, PyCharm professional and python 3.5. This is what I’ve done so far: I copied “pycharm-debug-py3k.egg” into the project folder I added the following lines in the […]

Understanding Docker best practice and running webservers

I am in the situation of running a simple PHP7.0, Redis and NGINX server in a single container. This means I run php7.0-fpm and ngxinx and redis as a service. But in the best practices I am reading: # Run only one process per container In almost all cases, you should only run a single […]

Required ports for JMS using HornetQ (JBoss) to expose on docker container

I’m using Docker to link JMS server container to another JMS client container. But when I run the server in the docker container, the client can not connect to the server correctly. I exposed port 443 on docker (Is there any other port which JMS uses?) I can successfully create destication, but not the JMS […]

Docker daemon not starting after adding the -H flag

I’m trying to use Docker Swarm, to do that I need to start the Docker daemon with the -H flag on each node using this command: docker -H tcp:// -d When doing this on my node (Debian 8, Docker 1.6.0) the command never stops, even if it displays that the daemon has completed initialization. The […]

Creating an environmental variable within Docker container when starting up

How would I get the ip address of a mongo container and set it as environmental variable when creating a node image? I’ve been running into an issue with conflicting tech stacks: keystone.js, forever, and docker. My problem is that I need to set up an environmental variable for a separate mongo container which would […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.