Giter VIP home page Giter VIP logo

debian-normalized's Introduction

Preparing my very first normalized Debian Docker image

๐Ÿšง This is thinking and experimenting. Please contribute and help me make decisions! ๐Ÿšง

So many Debian images are so complex and far away from safety and security of debootstrap-generated files.

  1. Created with debootstrap command - So clean ๐Ÿคฉ so lovely ๐Ÿคฉ
  2. Normalized - even Debian base system has problems
  3. All features from my debian-setup.sh in an image

Parts of the base image

+Docker daemon logs: /var/log/syslog
?debconf configuration?
+image normalization apt-mark auto, blacklist: init (sysv, systemd) <features from debian-image-normalize.sh
+boot/halt docker run --restart=always
+timezone tzdata, /etc/timezone
+hostname docker run --hostname
+DNS docker run --dns, embedded DNS server?, /etc/resolv.conf?
+nscd time getent ahosts intel.com
+tini docker run --init; docker exec -it CONTAINER-NAME ps -fA
+user serices:root, applications:normal user
    addgroup --gid 1000 app
    adduser --uid 1000 --gid 1000 --gecos '' --disabled-password app
-sshd
-dbus
-acpid
-rsyslog,logrotate STDOUT, STDERR -> Docker logging
-cron in host/container?
+queue in container
-mail SMTP & disable mail() or msmtp-mta
-chrony from host
-haveged from host
-irqbalance from host
?monit ?
+cli tools from another image
-delete unnecessary files

Inspect image

  • List package sizes dpkg-query --showformat='${Installed-size}\t${Package}\n' --show | sort --numeric-sort
  • Show layers on CLI: docker image inspect, docker hisrtory, dive

Apps

configuration, data files, logs

+Apache 2.4 with HTTP/2 and event MPM
+PHP-FPM 7.4
+Redis in-memory cache
+MariaDB 10 or Percona Server 5.7
+WordPress
+Laravel

Delete unnecessary files

apt-get clean
rm -r /var/lib/apt/lists/*
rm -r /usr/share/locale/[a-z][a-z]*
rm -r /usr/share/man/[a-z][a-z]*
rm /var/log/dpkg.log /var/log/bootstrap.log /var/log/alternatives.log /var/cache/ldconfig/aux-cache

debian-normalized's People

Contributors

szepeviktor avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.