Skip to content

LM1LC3N7/Dockerfiles

Repository files navigation

Dockerfiles

Base images

When it is possible and I technicaly succeed, docker images are based on distroless (see lines with this tag: distroless).

"Distroless" images contain only your application and its runtime dependencies. They do not contain package managers, shells or any other programs you would expect to find in a standard Linux distribution.

Some resources:

Securely deploy containers

My commandments are:

  • Limit container resources (avoid that one container use all resources)
  • Limit container rights by dropping linux capabilities by default
  • Only run processes with simple user rights
  • Create my own image based on distroless or alpine to limit the surface attack

I use docker-compose v2.4 because the v3 does not allow resource limiting on a docker host non-swarm.

Docker containers I use

  • duplicati : Multi-backup solution (Duplicati). Debian
  • ghost : Simple blog CMS (Ghost). Distroless
  • jellyfin : Multimedia web based solution (Jellyfin). Official image
  • netdata : Netdata is a real-time, performance and health monitoring for systems and applications. Alpine
  • nextcloud : Nextcloud is a self hosted private cloud. linuxserver/nextcloud image
  • nodebb : NodeBB is the "next generation forum" using web sockets for instant interactions. Alpine
  • pritunl : Pritunl is a web interface for managing openvpn servers. Alpine
  • rtorrent : A torrent download tool (rtorrent). Alpine
  • flood : A clean web interface for rtorrent (flood). Distroless
  • sslh : Applicative protocol multiplexer (sslh) usefull to use the 443 port with multiple protocols: https / openvpn / ssh / shadowsocks. Alpine

Usefull commands

Docker layers number:

$> docker image inspect <image> -f '{{.RootFS.Layers}}' | wc -w
3

Image size:

$> docker images <image>:<tag>
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
<image>             <tag>               a12b345cd67e        3 days ago          16.2MB

License

MIT License

Copyright (c) 2019 Louis MILCENT

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

A collection of Dockerfiles I personally use, as secure as I can.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published