/images/avatar_ro.png

Back 2 Code

Linux startup scripts

When it comes to perform customization to startup scripts in order to initialize or tune something, it’s not obvious to pick the right startup file. The way the system is reading startup files depends on the context and mainly if the shell is

  • Interactive / non-interactive shell
  • Login / non-login shell

APT usage in Docker images

When packages are installed in a Dockerfile through APT (Debian, Ubuntu) you should comply with some best practices. One of the main reason is to try to keep the image as as small as possible, but it’s not the only one. Let’s examine a typical snippet of package’s installation.

Skeletal profiles

Sample startup files are traditionally kept in /etc/skel. If you customize your systems' startup file examples, /usr/local/etc/skel is a reasonable place to put the modified copies.1

Pytest smoke testing

It’s a good practice to test that some prerequisites are met before going further. This practice is sometimes called Smoke testing. When you have to setup an infrastructure either on a host or in docker images. In this case Pytest + testinfra is a terrific combo to perform this kind of testing.