Build
When we build a Docker image of our application, we already know which version of the application will be in it. But often we don’t bother passing this information inside the container. Especially when it comes to web applications. However, this can be useful. For example, for error monitoring, it will definitely be helpful to know which version of the application crashed and when it was built.
In this article, I’ll explain how to pass information about the application version inside the container. This applies to applications in Go as well as web applications in Node.js. I’ll also show how to use this information inside the container.