Migrated the Blog from Pelican to Hugo

I’ve been using pelican to build blog.ceshine.net for about two years, and as you can see, I’ve not been very productive. Part of the reasons is that I found I spent more time tuning the code rather than actually writing stuffs. Recently Go-based Hugo caught my attention. Go can easily compile multi-platform binary executables, which makes deployment much easier. Hugo also provide a decent built-in web server whose performance is good enough for some small-scale production use. So after some experimenting, I decided to replace the old pelican site with Hugo. ...

July 28, 2015 · Ceshine Lee

Change Sources of Ubuntu in a Docker image

The official docker images of Ubuntu use archive.ubuntu.com as the default package source. Because my Internet connection is metered, I’d like to change it to the free mirror server my ISP provides. And this command does the trick: sed -i 's/http:\/\/archive.ubuntu.com/http:\/\/mirror.internode.on.net\/pub\/ubuntu/g' /etc/apt/sources.list Change http://mirror.internode.on.net/pub/ubuntu to the url of whatever mirror you prefer. And add RUN to the start of the line and put it into the Dockerfile.

July 7, 2015 · Ceshine Lee

Docker: Remove All Untagged Images

By courtesy of this post, its comment section and this thread: Clean up old containers docker ps -a | grep 'Exited' | awk '{print $1}' | xargs --no-run-if-empty docker rm Remove All Untagged Images docker rmi $(docker images -q --filter "dangling=true")

July 5, 2015 · Ceshine Lee