https://hub.docker.com/_/postgres
on visual studio code :
$ docker pull postgres
start a postgres instance
$ docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres
or
$ docker exec -it 1ddd37ea6aa5 /bin/bash
on DockerDesktop press cli
#su – postgres
psql
postgres=# show config_file;
postgres=# \q
postgres@1ddd37ea6aa5:~$ exit
# apt-get update (because postgres is on ubuntu default)
# apt-get install vim
# su – postgres
vim /var/lib/postgresql/data/postgresql.conf
make changes in parameters :wq to save and exit
at visual studio code:
$ docker ps -a
$ docker restart <postgres_container_id>
That’s all.