Posts
Why you might want to avoid building C++ applications w/ `vcpkg`
Dockerizing š³ a C++ application can be much more difficult than dockerizing a Node.js or Python application. And it is not the execution of the binary that is difficult (that is easy). Itās rather that compiling the source code requires a further stage in the Dockerfile, a so-called build stage, in which all build tools (
gcc
,cmake
, etc.) and all dependencies (boost
,zlib
, etc.) must be installed and available.To define these dependencies, one might be tempted to use
vcpkg
, a āC++ Library Manager for Windows, Linux, and MacOSā (https://github.com/microsoft/vcpkg), which is basically the equivalent of usingnpm
+package.json
in Node.js orpip
+Pipfile
in Python, right?Unfortunately, it is not. This approach leads to several problems.
Making use of Ubuntu's `unattended-upgrades` package to keep servers up-to-date without breaking them (hopefully)
During my life, Iāve mainly seen and used three ways to keep Ubuntu servers š§ up-to-date:
- Manually (not recommended š time-consuming and error-prone)
- Cron job via
/etc/crontab
(works, but still not greatā¦) unattended-upgrades
(the easiest and most robust way!)
Hello, world!
def print_hello(name) puts "Hello, #{name}!" end print_hello('world') #=> prints 'Hello, world!' to STDOUT.
subscribe via RSS