Upgrading Docker Compose to latest version

If you use Docker for Mac or something similar, Docker Compose will be installed along with it. Docker Compose has a different release timeline for Docker for Mac so you will not be able to try latest version of Docker compose until you upgrade Docker for Mac. This is limiting. You should be able to install Docker compose independently. To achieve that, you can run following command

$ composeVersion=1.13.0
$ curl -L https://github.com/docker/compose/releases/download/$composeVersion/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose$ chmod +x /usr/local/bin/docker-compose

In the above commands, $ signify bash prompt. You don’t have to type it. Now, you can check Compose version using the command shown below.

$ docker-compose version

Sandro Mancuso Talk : Functional is cool, but do you know OO

One of the best talks on SOLID design principles and OO design that I have watched recently. This talk is 4 years old but more relevant today as many programmers are trying to follow functional programming bandwagon without understanding what they are getting into. One of the best advice speaker gave is to use OO at the outside boundary of your system and FP in the inside where you are doing data transformation and processing. A lot of good literature exists on OO design so let’s make read it and try to first do OO right.

Bret Victor Talk: The Future of Programming

This talk by Bret Victor is an eye opener.  It was delivered by Bret in 2013. He gave this talk assuming we are in 1973 and then talked about how future of programming will look like in 2013. He talked about various CS discoveries and programming approaches people were trying during 1960 and 1970 era. At that time, nobody new what is correct way to program so they were experimenting with many different approaches. Nobody was fixated on one right approach so different approaches were tried.

Continue reading “Bret Victor Talk: The Future of Programming”

Alan Kay Talk: The computer revolution hasn’t happened yet

This is a very good talk where Alan Kay talks about what’s wrong with current OOPS languages and how he envisioned object oriented. For those who don’t know, Alan Kay coined Object Oriented Programming term. He is also one the guys who designed Smalltalk. There are many awesome ideas shared in this talk. I liked the quote below:

The part of message of OOP was that as complexity start becoming more and more important architecture is always going to dominate material.

Continue reading “Alan Kay Talk: The computer revolution hasn’t happened yet”

Talk: Container Performance Analysis

Today, I watched DockerCon 2017 talk on Container Performance Analysis. Talk is given by Brendan Gregg, Senior Performance Architect at Netflix. In his talk, he shares various linux tools that can help you understand performance of your container platform. It is a great talk for anyone trying to do performance analysis of containers. In one of his slides, he shared 10 tools that he will use to start the investigation.

  1. uptime to check load averages
  2. dmesg | tail  to check kernel errors
  3. vmstat 1 to see overall stats by time
  4. mpstat -P ALL 1 to check CPU balance
  5. pidstat 1 to check process usage
  6. iostat -xz 1 to disk I/O
  7. free -m to check memory usage
  8. sar -n DEV 1 to check network I/O
  9. sar -n TCP, ETCP 1 to view TCP stats
  10. top for overview

Continue reading “Talk: Container Performance Analysis”

Talk: Alpaca Static Typing On The Beam

Today, I watched talk Alpaca Static Type Checking on the Beam.  alpaca-lang is a statically typed functional programming language inspired by ML family of languages for the Erlang VM. It has strong type inference based on Hindley-Milner type system. Type checker will disallow adding String to an Integer. It looks like an interesting language.  Continue reading “Talk: Alpaca Static Typing On The Beam”

Multi-stage Docker Image Build for Java Applications

A few days back, I discovered a new Docker feature — multi-stage builds. The multi-stage build feature helps you create thin Docker images by giving possibility to divide image building process into multiple stages. Artifacts produced in one stage can be resused by another stage. This is very beneficial for languages like Java as multiple steps are required to build the Docker image. The main advantage of multi-stage build feature is that it can help you create smaller size images. This feature is not yet available in stable versions of Docker. It will become available in Docker 17.05. To use this feature, you have to use edge version of Docker CE.

To build a Docker image for a Java application, you first need to build the Java project. Java build process needs JDK and a build tool like Maven, Gradle, or Ant. Once Java binary artifact is produded, you can package the binary in a Docker image. For running a Java binary, you only need JRE so you don’t have to pay the cost of bundling the whole JDK.

You can read full blog at https://blog.xebialabs.com/2017/05/25/multi-stage-docker-image-build-for-java-applications/

5 Docker Utilities You Should Know

There are a lot of cool Docker utilities that you can find on the web. Most of these are open source and available on Github. I have become an active user of Docker for last two years, using it for most of my development projects. As you start using Docker, you will find Docker is suitable for more use cases than you initially envisioned it for. You will want Docker to do a little more for you, and it will not disappoint you.

Docker community is very active, a lot of useful utilities keep popping daily. It is difficult to keep check of all the innovation happening in the community. In the following post, I have collected some interesting and useful Docker utilities which I use in my daily work. These utilities makes me more productive, otherwise would have been a manual work.

In this post, I will cover watchtower, docker-gc, docker-slim, rocker, and ctop utilities. You can read full blog at https://blog.xebialabs.com/2017/05/18/5-docker-utilities-you-should-know/.

Inspiring Ordinary People – part 1

Yesterday, while roaming around Delhi streets I found an old man feeding pigeons near Humayun road traffic light. What caught my attention was the dedication old man showed in cleaning dirty utensils. Birds drink water from these utensils. Old man cleaned them properly without worrying about scorching heat. I consider him a real inspiration and want to thank him for his service. I don’t know his name but he deserves a place in my blog. Thank You.