question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"volumes must be a mapping" while trying to deploy this file

See original GitHub issue

Followed the procedure at (https://docs.docker.com/engine/getstarted-voting-app/node-setup/#interacting-with-the-machines), copy and pasted the file in the right directory of the manager. When i launch docker stack deploy --compose-file docker-stack.yml vote i get volumes must be a mapping" I’m working on Ubuntu 16.10, i tried also with Windows and it works fine.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
samanta60commented, Mar 8, 2017

@londoncalling: Sure! Each line in the file was ending with ^M, which I think always happens if you first save the file in windows and then copy and use it in linux. I could see the ^M at the end of each line, when I opened the docker-stack.yml file using vi command in linux.

2reactions
ManoMarkscommented, Mar 8, 2017

Could be a text encoding issue. @Tirocigno can you check that?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ask Question
ERROR: In file './docker-compose.yml', service 'volumes' must be a mapping not an array · Add two spaces before "- /usr/certs:/certs". – olegsv.
Read more >
Why does my Docker composer not work with volume?
In file '. \ docker-compose.yml', service 'volumes' must be a mapping not an array. and so far I didn't ...
Read more >
Volume must be a mapping, not an array #5092
The problem is when I try to use the long syntax present in version 3.2. I've searched but not found anything related to...
Read more >
Docker compose build error - 'environment must be a ...
I am working in Portainer trying to create a Stack and I have been working through numerous errors that it throws my way…not...
Read more >
Docker compose build error - 'services must be a mapping'
I am working in Portainer trying to create a Stack and I have been ... to deploy a stack: services.jellyfin.environment must be a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found