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!

  • zarlo5899@alien.topB
    link
    fedilink
    English
    arrow-up
    1
    ·
    10 months ago

    o use podman and dont run any container as root if it need root i will use a VM

  • Defiant-Ad-5513@alien.topB
    link
    fedilink
    English
    arrow-up
    0
    ·
    10 months ago

    So attempt to run every container with the least privilege:

    • seperate networks for each stack
    • only map needed folders
    • run the container as a non root user (some containers won’t work so they need to be run as root user)
    • use a RP with authentication (if a app is valuable)
    • make differential backups to shrink size and increase the interval (and check if they work)
    • block internet access to containers that don’t need them