Tag: linux

NginX as HTTPS reverse proxy for multiple sub-domains?

I have one IP address on my Linux box, and would like to serve HTTPS websites in this form: https://landing.example.com https://site-01.example.com/index.html https://site-01.example.com/files/index.html https://site-01.example.com/store/index.html https://site-02.example.com/index.html https://site-02.example.com/files/index.html https://site-02.example.com/store/index.html Each of these websites is a Docker container on the same host, so my idea were setting up an NginX reverse proxy Docker container. There are many howto’s about […]

Run multi mysql services on same machine

I have linux machine ( ubuntu 14.04 32GB RAM 8 core …) I want to run on this machine several Slaves ( currently 5 slave replications but I will need more ) I use master-slave mysql replication From my point of view there are 2 options to do that 1. use mysqld_multi – set 5 […]

How to Give Docker Containers more resources

I’m using docker to create my local dev environment for developing Magento modules. Magento is very slow during most of the operations, and what I’ve noticed is that the CPU usage is not going higher then 20% for each core (my machine has 8 cores). Are there any settings I can change to give docker […]

Does containers depends on to a specific host?

I have an application which have kernel space code and it is compiled in linux kernel 2.6.32-431.el6.x86_64 (centos 6.5). Then it is installed as kernel module to run the application. When I tried to containerized my application with Docker (which is installed in Amazon Linux AWS EC2 instance), it complains about the higher kernel version […]

Create a network for two machines in docker that is not reachable from the host system

Is there a way to create a network with two docker containers in it which is not accessible from the host system? I search some way to do what is called internal networking in virtualbox. If it is possible, how? And if it is not, why? Thanks 😀

Docker root directory issues

When I run a docker image of debian, the root folder seems be a bit out of place. For e.g : when the docker containers root folder seem to be at some place like this : /var/lib/docker/aufs/mnt/f5656c3118921437130c22785982f09c2695e23ade334809091b6dc5918d6298 when I login into the docker container, all my root directory is at /var/lib/docker/aufs/mnt/f5656c3118921437130c22785982f09c2695e23ade334809091b6dc5918d6298 If I do a […]

Unable to connect to dockerized mysql db remotely

On my AWS ec2 server I have docker 1.9.1 installed. In an image test_image based from ubuntu:trusty official docker image, I have tried to setup the LEMP(Linux, Nginx, MySQL, PHP) architecture. Following is the docker command i have used to start my container: docker run –name test_1 -d -p 80:80 -p 3306:3306 test_image /bin/sh -c […]

Docker – How to check if curl command inside Dockerfile had response code 200

Inside a Dockerfile I try to download an artifact using curl. I have checked that although the artifact doesn’t exist (thus getting a 404) the docker build keeps running. RUN curl -H ‘Cache-Control: no-cache’ ${STANDALONE_LOCATION} -o $JBOSS_HOME/standalone/configuration/standalone.xml Is there a way to check that the curl response code is 200 and throw an error otherwise?

Best place to install antivirus with docker

Currently I’m building some base images to use as docker hosts and I’m unsure where is the best place to run the antivirus. Is it best to run on just the host or would it be best to base our new containers off a docker image that has antivirus baked into it? I can see […]

Resolving env inside another env

So i would like to print my env variable which contains other variables. For example i have: MY_VARS=”My var are:\nVAR1 = ${MY_VAR1}\nVAR2 = ${MY_VAR2}” MY_VAR1=var1 MY_VAR2=var2 and i would like to make it possible in way like: printf “${MY_VARS}” > my.conf or printf “$(echo ${MY_VARS})” > my.conf to get sth like in my.conf file: My […]

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