Run node apps on port 80 without Root permissions

Most of us run the node apps under the root user, so last time I talked about using IPTables to do some tricks which will route the requests from port 80 to port 8080.

Today I was able to do so without IPTables , and you can run this command with SUDO to give node the ability to use the port 80 :

I did use it on Ubuntu 16.04 and it worked like a charm.

Filed under: Code, Linux

How to bind Docker image to specific IP on MAC

PS: this is an experimental idea so it might not work for you.

I’ll try to make short here, so basically you will have to pass the IP with the expose port while you execute docker run for example something like

Now the question why do I need to do something like that since at the end docker will be bind to localhost and more specific to , and to be honest this is just a simple try for me to imitate the ability to have two (or more) vagrant boxes running on the same machine and both has the port 80 exposed to the host.

So normally you will only have one image cause you cant have two images on the same port (or at least this is what I have in my mind right now), so the command above will help, now when you try it you will face a small problem, which is that the IP should be the same as your host IP and you cant have both images have the same IP, so it wont work and we have gain nothing, lets talk about how vagrant/virtualbox work, they do a small trick where virtualbox will create a virtual network adapter and configure it to have the IP which you specified in Vagrantfile, so I guess we will have to do the same Creating a new virtual network adapter.

Continue reading

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

How to configure PHPStorm to work with native Docker on Windows

Some how most of what we have talked about in the previous article about “How to configure PHPStorm to work with native Docker for mac“, so mostly you will have to do the same except that you dont need to install socat but you will need to make sure that :

1- you have enabled the Disk Share on the drive that you are using like for example:


2- you will need to make sure that you are using the following address : tcp://localhost:2375


and everything else will be the same as the old post.


Happy Coding Everyone


Filed under: Code, PHP

When to ask for Investments

First of all and before I say anything, I just want to take you in a small trip back in time where we (me and Hala) lunched our start-up Msrofi .

At that time everyone thought it was a good idea, but we forget one important things that nice ideas need money. So few years later we had to close the project and even when we tried to get investors to invest in the project ( in 2013 ) they though its not ready yet.

Now lets talk about Investors and do we really need them, In my opinion if you have a good amount of money which will let you create a stable business and valuable product then try to stay away from Investors, dont try to go to them let them come to you, and when I say a stable business I mean:

  1. Good and talented technical team.
  2. Good money income which cover some of your expenses, or lets say a stable money flow.
  3. Good plan for a steady growth.

Continue reading

Filed under: Business

Debug your PHP with Docker and xDebug from PHPStorm

Last time we have talked about how you can enable Docker and work with it via PHPStorm, today I’ll try to explain how you can debug your app using Docker from within PHPStorm using xDebug.

First of all you must have your PHP image up and running, but sadly you cant use the official one, you will need to build your own image, you can use this small script that I have wrote

Continue reading

Filed under: Linux, MySQL, PHP