docker run -i --rm postgres cat /usr/share/postgresql/postgresql.conf.sample > my-postgres.conf
I expect a file to be created as my-postgres.conf on my host machine which is a copy of the file: /usr/share/postgresql/postgresql.conf.sample which comes from postgres.
Observed Output:
cat: 'C:/Program Files/Git/usr/share/postgresql/postgresql.conf.sample': No such file or directory
Is there any missing step?
>Solution :
With windows you can pass in the -c:
docker run -i --rm postgres sh -c 'cat /usr/share/postgresql/postgresql.conf.sample' > my-postgres.conf