2

I have a docker in my Macbook that is working, with the following script:

version: '2'
services:
  nginx:
    image: nginx:latest
    container_name: nz01
    ports:
      - "8000:8000"
    volumes:
      - ./src:/src
      - ./config/nginx:/etc/nginx/conf.d
    depends_on:
      - web
  web:
    build: .
    container_name: dz01
    depends_on:
      - db
    volumes:
      - ./src:/src
    expose:
      - "8000"
  db:
    image: postgres:latest
    container_name: pz01
    ports:
        - "5433:5432"
    volumes:
      - ./postgres-data:/var/lib/postgresql/data

When I replicate it at windows 10 without Hyper-V, so I working with docker toolbox the postgres container is failing with the following log:

The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
2018-07-25T16:05:53.723099340Z 
The database cluster will be initialized with locale "en_US.utf8".
The default database encoding has accordingly been set to "UTF8".
The default text search configuration will be set to "english".
2018-07-25T16:05:53.723133181Z 
Data page checksums are disabled.
2018-07-25T16:05:53.723144716Z 
fixing permissions on existing directory /var/lib/postgresql/data ... ok
creating subdirectories ... ok
selecting default max_connections ... 100
selecting default shared_buffers ... 128MB
selecting dynamic shared memory implementation ... posix
creating configuration files ... ok
2018-07-25 16:05:55.787 UTC [30] LOG:  could not link file "pg_wal/xlogtemp.30" to "pg_wal/000000010000000000000001": Operation not permitted
2018-07-25 16:05:55.792 UTC [30] FATAL:  could not open file "pg_wal/000000010000000000000001": No such file or directory
child process exited with exit code 1
initdb: removing contents of data directory "/var/lib/postgresql/data"
running bootstrap script ..

To get this log I deleted the /postgres-data directory in my windows folder, because previously I got an error refering of users permissions, so I thought about delete folder, and Docker automatically will generate the folder.

I google the error that I get and I can not find any related, so I do not know why is happening it...

Any help?

2
  • Have you shared the windows drive with Docker? Like so imgur.com/a/tXb4qHu Commented Jul 25, 2018 at 19:10
  • I did not, where can I find this option? I have take a look on kinematic and did not fInd the option. Commented Jul 26, 2018 at 10:18

2 Answers 2

2

I had a similar issue with Docker in MAC M2 ARM.

Disabling "VirtioFS" fixed my issue.

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

1

Finally I solve it.

I restart the whole computer, delete the repo and start all again from desktop. As I have seen in the Docker docs, the folder must be in a public path, such as C:/Users/YourUser

After that, I do not have any problem.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.