Someone at my workplace created a bunch of .yml files to use with
docker-compose. All of these .yml files were created in Windows 10 with the
UTF-8 with BOM encoding. Whenever I run the
docker-compose commands together with those .yml files, I get this error:
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have ‘-rwxr-xr-x’ permissions. It is recommended to double check and reset permissions for sensitive files and directories.
ERROR: In file ‘c:/repository/docker-compose-test.yml’, service ‘ï»¿version’ must be a mapping not a string.
I can fix this by opening all of the .yml files and saving them with
UTF-8 encoding (removing BOM). I wouldn’t consider this a problem, but my problem is, that I am the only one this is happening to. Everyone else got it to work with their Windows 10 with Danish or English language pack.
All our Windows installations are completely the same, since they come from the exact same image, so it would appear that I have some issues.
Also, I had to write this
$Env:COMPOSE_CONVERT_WINDOWS_PATHS = 1 in my PowerShell terminal, before I could use
docker-compose correctly. No one else had to do this.
Could this be a Docker problem? If so, how would I fix this? All the .yml files are shared in a repository, so fixing all the files each time, would be a pain in the ass.