Secrets invalid mount config for type 'bind' mount path must be absolute
Brought to you by:
austinsuero97
Originally created by: BluZz95
Docker compose does not convert secrets source path correctly while using docker toolbox (virtualbox).
Output of docker-compose version
docker-compose version 1.24.0dev, build unknown
docker-py version: 3.7.0
CPython version: 3.7.2
OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018
Output of docker version
Client:
Version: 18.09.2
API version: 1.39
Go version: go1.11.5
Git commit: 62479626f2
Built: Wed Feb 13 09:02:49 2019
OS/Arch: windows/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 18.09.3
API version: 1.39 (minimum version 1.12)
Go version: go1.10.8
Git commit: 774a1f4
Built: Thu Feb 28 06:40:51 2019
OS/Arch: linux/amd64
Experimental: false
Output of docker-compose config
(Make sure to add the relevant -f and other flags)
secrets:
password:
file: C:\Users\Joaom\teste\secrets\password
user:
file: C:\Users\Joaom\teste\secrets\user
services:
rice:
image: alpine:3.8
secrets:
- source: password
- source: user
version: '3.6'
Secrets are not mounted in the container, because compose is not converting path from Windows to unix Style correctly like it does for volumes.
secrets to be mounted successfully.
Creating network "teste_default" with the default driver
Creating teste_rice_1 ... error
ERROR: for teste_rice_1 Cannot create container for service rice: invalid mount config for type "bind": invalid mount path: 'C:/Users/Joaom/teste/secrets/password' mount path must be absolute
ERROR: for rice Cannot create container for service rice: invalid mount config for type "bind": invalid mount path: 'C:/Users/Joaom/teste/secrets/password' mount path must be absolute
ERROR: Encountered errors while bringing up the project.