Of commits and containers
Using a Dockerfile to embed revision information in your Go application
Guillaume Bolduc, Unsplash When I’m debugging an issue with an application, one of the first questions I ask is what version of the application I’m looking at. If different versions of my app are deployed in multiple environments, it’s always worth checking to make sure the environment I’m looking at is running the code I think it is. There are a few ways of accomplishing this. Sometimes you can SSH into your server and run git log -1, but if your application is running in a container that’s not always available.
This post was originally written as a guest post for RyboMedia on October 15, 2009. Thanks to Rybo for letting me post this! Hope you all found it enjoyable and informative. We ran into a problem at work last week that was, at the same time, a nightmare and exactly the kind of problem you want to have. The culprit was our latest Big Prize Giveaways promotion, and the problem was that our app had metaphorically gone from 0-60 in about two seconds, and it experienced the same thing your neck feels when it accelerates that fast: whiplash.