Trying to get Postgres to work on persistent windows mount - two issues

Hi

I had the same issue. But I’m using docker-compose to launch multiple containers.
The workaround I found is to create a volume with

docker volume create --name gitlab-postgresql -d local

and use this volume, instead of a host volume.

And in my docker-compose.yml looks like:

version: '2'

services:
  postgresql:
    restart: always
    image: sameersbn/postgresql:9.5-1
    volumes:
      - gitlab-postgresql-volume:/var/lib/postgresql:Z

  volumes:
    gitlab-postgresql-volume:
      external: true

Data are persistent and I have no problem of NTFS filesystem

5 Likes