No Internet access from your Docker container? Check this out!

After a recent update I started having issues with my containers that hosted apps which were accessing the outside world periodically. At first I couldn’t understand where the problem is. I’ve been checking a lot Github issues without success and finally I remembered that I’ve made an update to my host which updated the kernel.

What I needed now is to find a way to boot with an older kernel selected by default. I started looking in Stackoverflow pages and blogs and found a way to set any kernel that I already have installed as the default one.

Here are the steps I took to fix my problem(my host is running Ubuntu linux):

  • check the /boot/grub/grub.cfg file for all available options you have. The name of every kernel installed is there. Pick one that is older than the latest installed. You have to look for entries like: “menuentry ‘Ubuntu, with Linux 3.13.0-113-generic'”. You will use the “Ubuntu, with Linux 3.13.0-113-generic” part
  • next open the /etc/default/grub file and look for the GRUB_DEFAULT entry
  • combine your kernel config name from point one from above with “Advanced options for Ubuntu” or “Previous Linux versions” for older Ubuntu versions (<14.04). You’ll have to have a similar string like this one now: “Previous Linux versions>Ubuntu, with Linux 3.13.0-92-generic”. Set GRUB_DEFAULT to this string like: GRUB_DEFAULT=Previous Linux versions>Ubuntu, with Linux 3.13.0-92-generic
  • you can use numeric values for GRUB_DEFAULT but it’s not recommended as the number will point to a random kernel config after the next update
  • save, run sudo update-grub and restart

Now you should have an Internet access from inside the Docker containers. This is just a temporary solution so don’t leave it like this, especially running with an older kernel. Better check you configuration and even reinstall everything on your host, use a newer linux distro, etc.

Source

Docker 1.9.0 and the new network configuration

Docker 1.9 is here and it introduces a new way to handle the networking between containers.
Because docker containers should live a short live before being replaced with their new versions one should ask himself do we really need the static IP that was existing until now and assigned to the Docker’s bridge? The usual IP you will see was 172.17.42.1.

After upgrading this IP will be gone. Instead other IPs will be created dynamically. Of course there will be another IP like 172.17.0.1 assigned to the docker0 bridge. You can use it if you are brave enough but better not.
However if you need a quick fix before going to bed you can use the Docker’s –bip parameter to set the bridge IP back to 172.17.42.1.

Another way is to go back to version 1.7.1 using your OS’s package manager or direct install/compile.
Later when you decide to start using Docker’s networking the right and better way, you can start from here.

Node.js Tutorial by Udemy

Source: Node.js Tutorial

An enormous tutorial covering from the beginning to the end of what you need to know about how to use Node.js, Express.js, MongoDB and Angular.js or the whole MEAN stack for short.

Installing of all tools and servers is covered, project structure, creating an API, etc. From here you will already have a good idea where to go next.

Enjoy!

Node.js v4.0.0 is here!

So we lived to see it. Node.js version 4 is here which means we have the latest V8, ES6 support and the latest security patches for our favorite tool! Well the previous statement cannot describe how much good things just happened. From the creation of Node.js, through the fork of IO.js, until finally the latest version and the merger happened and now the community has the word how Node.js will be shaped from now on.

I am personally very excited about that and I am currently going to test and update one of my Docker apps that installs and uses Node.js through NVM.

I am also expecting a lot of work on this major version and the patches and new features are coming sooner than later which makes it very interesting to use Node.js these days!

Enjoy!

Introducing Graylog Collector – The Comprehensive Log Collection Tool For Graylog | Open Source Log Management with Graylog

Source: Introducing Graylog Collector – The Comprehensive Log Collection Tool For Graylog | Open Source Log Management with Graylog

This makes Greylog a full-featured logging solution and we are now able to remove other logs forwarding software which will save great server resources too!

How can you tell if a programmer knows Docker in 5 questions? | The Snap.hr Blog

Source: How can you tell if a programmer knows Docker in 5 questions? | The Snap.hr Blog

I struggled only on the last question about the difference between AUFS and DeviceMapper but these kind of questions always help me to find what I have to know to pass them. And I love to learn new things!

Do 404s hurt my site? | Official Google Webmaster Central Blog

I’ve been through this. Testing and redirecting wrong urls and missing pages. I have a site with a couple of million pages where soft 404 and also not found pages can increase to hundreds of thousands after a big automatic update. I managed to handle all of these pages as a single developer of my own sites by refactoring and testing the code making it more predictable so when I change multiple pages I know what to expect. Here comes the very good communication with Google’s Webmaster tools with the help of which I discover bad things on time and can even improve an already a good positioned website.

Of course one of the big things to watch out for are 404 not found and 500 server errors. So let’s read about the former here:

Source: Official Google Webmaster Central Blog: Do 404s hurt my site?

Visual Studio Code comes to Windows, Mac, and Linux | ITworld

As part of the Microsoft cross-platform assault, a new editor called Visual Studio code has been released with support for Windows, Mac OS, and Linux

Source: Visual Studio Code comes to Windows, Mac, and Linux | ITworld

I try to avoid Win* stuff and when I have to use it I make it look and feel like Linux. But if they continue to do software of that kind I may start using it.