Docker best practice on base images and host os

I have a questition about the best pratices on using docker in production.

In my company we use SLES12 as host os. Should we use SLES also as base for our docker containers?

  • Why does building from a docker file take up all the disk space?
  • Running Portainer in a Docker Container with Apache 2.4 mod_proxy and basic auth
  • Docker busybox exit immediately
  • AWS ECS - Images from S3
  • How to run docker-compose on remote host?
  • Cannot install Python Package with docker-compose
  • In my opinion SLES image is too big to follow the ddocker recommendation for small base images.

    My questition is: Has anyone experience in using docker in production with different host and container os? Are there any disadvantages if we use a small debian/ubuntu base image for our containers? (overhead, security, …)

  • Docker: is it possible to use overlayed backing filesystem?
  • Disable certain Docker run options
  • Elastic Beanstalk high CPU load after a week of running
  • What is a docker-compose.yml file?
  • Stop Minecraft server in Docker when container stops
  • Docker : RUN cd … does not work as expected [duplicate]
  • One Solution collect form web for “Docker best practice on base images and host os”

    I agree with your assessment that for dockerized applications, smaller base images are preferred. This will save on disk space, reduce network transfer, offer a smaller software surface to worry about security vulnerabilities and general complexity. To my knowledge different host/container distributions is the norm and when they align it’s more of a coincidence than an intentional design. Since the way you interact with the host OS and the container are so very different, even if they were identical, you procedures for keeping things patched would be different. That said, depending on your staff skill set, sticking to the same package manager ecosystem (rpm vs deb) may have some benefit in terms of familiarity of tooling, so finding a small base RPM distro might be a good choice.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.