Re: postgresql in docker to improve security - Mailing list pgsql-admin

From Kashif Zeeshan
Subject Re: postgresql in docker to improve security
Date
Msg-id CAAPsdhdORCqnqGeMDyWQFE3PcF54kOB6-20U7mQCZ4nheCFUhQ@mail.gmail.com
Whole thread Raw
In response to postgresql in docker to improve security  ("Nguyen, Long (IM&T, St. Lucia)" <Long.Nguyen@csiro.au>)
Responses Re: postgresql in docker to improve security
Re: postgresql in docker to improve security
List pgsql-admin
Hi

Yes docker container improves the security and following are the ways it does.
1. Isolation : When you run postgres in a container, you are isolating it from host os and other containers so it limits the attack surface.
2. Port mapping : By mapping only the necessary container port and allowing access only using that port limits the attack surface.
3. You can manage the access privileges of the users that run container
4. Docker containers use namespaces for process isolation and security.

Regards
Kashif Zeeshan
Bitnine Global

On Fri, May 3, 2024 at 3:44 AM Nguyen, Long (IM&T, St. Lucia) <Long.Nguyen@csiro.au> wrote:

Good day. This is a general db question.

 

I start exploring containerisation and start learning docker.  Would having postgresql in docker improve security in the sense that users could only access to the db through the port mapped to the environment outside of docker, and if they somehow are able to hack and access outside the db, the access is limited within the container not the OS that host the container.

 

Thanks.

pgsql-admin by date:

Previous
From: "Deepak Pahuja ."
Date:
Subject: Re: HA Setup Review
Next
From: Ron Johnson
Date:
Subject: Re: HA Setup Review