[docker] Multi-stage builds

Consider the following scenario: you are going to rolling update your cluster, and it turns out your network bandwidth is limited for some reason and size of built docker image is not small enough. What’s worse, every instance of cluster will need to pull the docker image before start-up…

Date
Categories
Tags
Comments

Developing with consul on Macbook

For development use, we need to have consul running on localhost. When using a Macbook (Air), we need to specify the “-bind=0.0.0.0” and “-client=0.0.0.0” in order to have programs (tests) access to the consul agent in the container: 

Date
Categories
Tags
Comments

Published:August 15, 2016 View Post

docker mac

Leave a comment

Install docker on Centos 7

Perform a yum search docker, we can see two docker available: docker.x86_64 : Automates deployment of containerized applications docker-io.x86_64 : Automates deployment of containerized applications Well, at least for today, the docker.x86_64, which is mentioned in , is still 0.11. So please install the docker-io.x86_64, which is 1.0.0-1.el7. Updated 20140829: there’s more up-to-date repo for…

Date
Categories
Tags
Comments

Published:August 14, 2014 View Post

golang

Leave a comment

Crop image in golang

In python, for cropping  image I use PIL. However the dependencies of PIL is huge, also need to install some lib*-dev packages. So I choose go to crop images: Usage: % go run crop.go large.jpeg thumbnail.jpg

Date
Categories
Tags
Comments

Published:October 4, 2013 View Post

golang

Leave a comment