Post Views : 2 This Content is from Stack Overflow. Question asked by natukita
When I ran: docker-compose up -d, I got error saying “ERROR: In file ‘./docker-compose.yml’, service ‘container_name’ must be a mapping not a string.” This is my yml file: ~ For more tutorials visit Jtuto.com people found this article helpful. What about you? QuestionHi, I am trying to use the example provided in the site https://docs.docker.com/compose/gettingstarted/ Step 3: Define services Define a set of services using docker-compose.yml: Create a file called docker-compose.yml in your project directory and add the following:
and when I run the command docker-compose up i got the below error ERROR: yaml.scanner.ScannerError: while scanning for the next token found character ‘\t’ that cannot start any token in “./docker-compose.yml”, line 18, column 1 so i removed all spaces and modified it as below Defines two web services, web and redisversion: ‘2’ services: web: build: . #Build from the dockerfile from current dir ports:
on trying it again i am getting an error now as docker-compose up ERROR: In file ‘./docker-compose.yml’, service must be a mapping, not a NoneType. Can I get some help what is wrong here… I am using MAC. Submit an answer This textbox defaults to using Markdown to format your answer. You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link! Sign In or Sign Up to Answer These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others. I'm getting issue when running docker-compose.yml file and below is the script written in the file
Below is my error:
Please help. I want to use the existing network "nextcloudpi":
I get the error:
asked Jul 4 at 15:36
2 This file is working as expected:
answered Jul 5 at 9:36
|