- Shell 58%
- Dockerfile 28.7%
- Makefile 13.3%
|
All checks were successful
Standard Build / build (push) Successful in 5m33s
|
||
|---|---|---|
| .forgejo/workflows | ||
| .dockerignore | ||
| .gitignore | ||
| apt-get.docker | ||
| Dockerfile | ||
| Makefile | ||
| README.md | ||
| test-1-Dockerfile | ||
debian-base
A base docker image based on Debian.
This is identical to the upstream Debian image, but with a few useful tweaks:
-
apt-getis replaced by a script which automatically runsapt-get updateif an install fails. This helps make otherDockerfiles tidier; no need to runapt-get updatein them: it will be done automatically when needed. Also:apt-get cleanwill be run automatically after eachapt-getcommand. -
All docker
RUNcommands are wrapped ineatmydatawhich disables fsync (and friends). This makes commands likeapt-getsignificantly quicker at the expense of data loss in the event of a crash. For docker builds: crashes are not much of a concern: It will need to be re-run anyway.Note that the
eatmydatawrapper is not used at runtime: It is only a build-time thing. -
While running "apt-get", the environment variable
DEBIAN_FRONTENDis set tononinteractive: This prevents (well-behaved) packages from asking questions during installation.
So: Basically:
-
Docker builds will be faster
-
Dockerfiles can be simpler: No need to specify any options when doingRUN apt-get ..., and no need to runapt-get updateat strategic points. Even if you add Debian repositories. It will "just work".
NOTE: If you use the
SHELL
directive in Dockerfiles which are based on this image: you will
lose the eatmydata speed-up.