There was a recent post about whether to enable ufw and it made me ask: how protected I am from a rogue docker container? I have a single server with 15-20 docker containers running at any given time. Should one get hacked or be malicious from the get go, are there (hopefully easy to implement for an armchair sysadmin) best practices to mitigate such an event? Thanks!

  • wzzrd@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    Run a server with SELinux enabled, and use Podman instead of docker (Podman I assume has better selinux support)

    • redzero36@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Never heard of podman but what I read on google is that its a drop in replacement for docker. Even read you can alias podman for docker. So does that mean we can just use docker images and docker compose files with podman? Are there drawbacks for using podman instead of docker?

    • yrro@alien.topB
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      This. On RHEL (or Fedora or CentOS Stream) containers are confined by the container_t domain and SELinux policy prevents them from interfering with host resources. In addition each container runs with a unique set of MCS labels, which stops a rogue container from interfering with other containers.