Docker compose wait don’t run it now

One of the main problem you will face when you work with Docker is that you are not 100% sure that the service on the ImageX is ready for you to use it or even for ImageY to communicate with it.

For example, lets say that you have the ImageX which run MySQL/MariaDB (or any other DB), and ImageY which run PHP, no matter how you try you cant be sure that ImageX is ready to accept connections from ImageY and CRUD some data from it, so Docker docs stated that you should find some solution for that, and they do provide some simple instruction for it on Controlling startup order in Compose.

Continue reading

Filed under: docker, Linux, MySQL, PHP

The myth about Docker depends_on and links

I have been reading lately (again) a lot of articles which try to explain to the developers how to use Docker for development, now they are all good (in general), each try to make simple and easy for you to move and use docker, and everyone advice you to use depends_on and links (but remember links is a legacy compose item so with Docker 1.13 you should use depends_on ).

both some how works the same, except that depends_on will give you the ability to define the order which your images should start.

Continue reading

Filed under: Code, docker, Linux, MySQL, Nginx, PHP

Few months without Facebook and no regret

For me, and somehow for most Syrians Facebook was a tool for us to communicate with other family members around the world, things has changed, and Facebook become a place where you started to read news, to see the point view of other people, a revolution here and revolution there, and a lot of sources for news, all type of news ..

To make my story short, things started to be a bit annoying for me, everyone trying to post the happy moment they have, the success they do and every single moment they can share just to let you know that they are living the Dream  no matter if its true or not, all what we see is that part.

In my live I don’t interact with people that much, I love to stay behind my computer, reading twitter or even try to chat on twitter ( do you remember when others used to say Twitter is not a chat ), any way, seeing all this nice and joyful atmosphere made my live like hell, yes when I can see everyone else has no issues, I remember that I have too much issues to deal with (and am not alone, the past 5y was not the easiest on us the Syrians), may be I was lucky to get out of the country, but that does not mean that I am living the Dream nor that I don’t have problems to deal with every single day.

So eventually I decided to just suspend my Facebook account, and only leave the Messenger, at least with the Messenger, I’ll not have to deal with everyone posts nor read everything they post, I can only read what they send to me and when they send it to me.

This somehow got some nice peace to my inner mind, maybe not 100% cause the source for my problems was not only Facebook nor seeing people happy. And till today, I cant say how much nice I find my live without Facebook and his sh%$#y social media, I know I still have to deal with twitter, but at least twitter is not Facebook (at least not for now).

Filed under: Other

How to install external PHP Modules in Docker

Over the time, while you are trying to work with docker, you will like what you see, you will like the idea that you are building one linux distro which can do one thing only, and thats for me a passion ..

And everyday you will have something new to discover, am not going to talk a lot but I’ll put the past and the new way that I have found which helped me to install external PHP module (xDebug) without any problem.

Before, when I wanted to include xDebug in any PHP Docker image I build, I’ll download the source code, compile it and then try to move the module file to the PHP extension directory ( or use pecl to install it ), which was simple when you are using Ubuntu, but this will also lead to have a big image 500+MB in size and so your Dockerfile will be something like this:

Continue reading

Filed under: docker, PHP

[Tip] Cloning a host machine via Rancher

If you have setup Rancher correctly and you have a machine running, you can clone it using the following option

Actually its not cloning by the exact name of cloning, but the thing is that it will use the same API token ( or any credentials ) you have used to create that Host, so for example am using DO, so it just going to use the same API token that I used before to create this host but you will got to the same UI that you have used to create the host like this one

Filed under: docker, Linux, Other