T
T
Troodi Larson2021-08-29 21:14:15
Docker
Troodi Larson, 2021-08-29 21:14:15

How to create a file instead of a directory?

There is yml with text:

volumes:
      - dbdata:/var/lib/mysql/
      - type: bind
        target: /etc/mysql/my.cnf
        source: ./mysql/my.cnf

Gives an error message
Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/run/desktop/mnt/host/c/Users/пользователь/Desktop/sample/mysql/my.cnf" to rootfs at "/etc/mysql/my.cnf" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type


And the my.cnf file itself exists. Already tried different options, it doesn’t work and deleted containers altogether and recreated, still trying to create as a directory, not as a file. Google solutions don't help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question