Is Docker generally solid enough for production deployment?

AI-generated summary

The discussion revolves around the reliability of Docker for production deployments. waverider is considering switching from deb/rpm deployment to containers for better dependency version control, but has concerns about Docker’s past security issues and stateless paradigm.

Falco shares their positive experience with Docker, running hundreds of servers across multiple datacenters with minimal issues. They mention that long-term state is usually stored in volumes mapped to the host.

waverider asks if Discourse containers run smoothly on both Ubuntu and RHEL distros. RGJ responds that while Ubuntu is the recommended OS, they have successfully managed on-premise deployments on CentOS 7 using Ansible. They also share relevant parts of their Ansible role for installing Docker on CentOS.

Falco clarifies that their infrastructure runs on Debian, with no RHEL in use, but this doesn’t directly address waverider’s question about RHEL compatibility.

Hey,

This is an offtopic question.

We’re packaging and distributing a web application and we feel the need to change the deb/rpm deployment to container way in order to control dependency versions (like a newer Python version on older distros).

I’ve looked around LXC/LXD and sounds tempting for old way of developing application with state stored inside the container. But we also need to deploy to RHEL/CentOS and both LXC and LXD packages state looks deplorable. And doesn’t look like LXD, nor LXC has a future in RHEL world.

I’ve sort of resisted Docker due to various design or security issues it had along the years, but also due the the stateless containers paradigm shift that we, old schoolers, need to embrace.

Is Docker now a reliable platform for small and large production deployments where app uptime is really important?

And what would be some best practices for packaging and distributing apps with Docker?

Since Discourse is exclusively deployed on Docker and I’m sure it has large deployments seems like the best place to ask this question.

Thank you

We are running hundreds of servers over tens of datacenters in both bare metal and cloud, and every part of the Discourse app is ran on Docker containers.

Docker does have it’s fair share of bugs, but for us the benefits outweigh the problems.

Just one thing:

I don’t know exactly what you mean by this, but long term state like a database data, is usually kept in volumes that map to the host.

Are Discourse containers known to run without issues both on hosts with Ubuntu and with RHEL distros (Ubuntu 18.04/16.04 and CentOS 7/8)?

Is this expected from Docker?

Most people use Ubuntu, it is the recommended OS.

We manage a few on-premise deployments on CentOS 7 (by customer request) without any issues.

Relevant parts of the Ansible role:

- name: add docker repository (CentOS)
  get_url:
    url: "https://download.docker.com/linux/centos/docker-ce.repo"
    dest: '/etc/yum.repos.d/docker-ce.repo'
    owner: root
    group: root
    mode: 0644
  when: ansible_distribution == 'CentOS'

- name: install docker
  package:
    name: "{{ item }}"
    state: present
  with_items:
  - docker-ce
  - docker-ce-cli
  - containerd.io

- name: ensure docker is started and enabled at boot
  service:
    name: docker
    state: started
    enabled: yes

We run all our infrastructure on Debian. No RHEL anywhere.