0

i have made this docker compose and works all except the minecraft-exporter, the error i get is:

mapping values are not allowed here in "./docker-compose.yml", line 16, column 18

I have looked some posts about the same problem but i couldnt find a solution for my problem.

The error is in this lines:

  minecraft-exporter:
     image: joshi425/minecraft_exporter
     environment:
       RCON_HOST: 127.0.0.1 \
       RCON_PORT: 25575
       RCON_PASSWORD: password
     ports:
       - 9700:8000
     volumes:
       - /path/to/minecraft/world:/world:ro

I would thank some help

  • Which line is the 16th one ? `RCON_HOST: 127.0.0.1 \ ` ? – AymDev Jun 04 '21 at 09:29
  • The line 16 is : `image: joshi425/minecraft_exporter` – Thejuanvisu Jun 04 '21 at 09:30
  • Maybe you need to provide the tag: `image: joshi425/minecraft_exporter:latest` ? – AymDev Jun 04 '21 at 09:32
  • I just tried it and doesnt seem to work... now it shows the same error but it is in line 17, so i think it fixed something. – Thejuanvisu Jun 04 '21 at 09:37
  • Why did you add a \ at the end of `RCON_HOST` line? remove it and try again – Saeed Jun 04 '21 at 09:37
  • Does this answer your question? [yml docker-compose error mapping values are not allowed here](https://stackoverflow.com/questions/57959973/yml-docker-compose-error-mapping-values-are-not-allowed-here) – AymDev Jun 04 '21 at 09:38
  • im still not able to fix it, when i use the yaml checker it throws the exact same error, but there are not tabs on this code so i dont know what to do.... i tried to rewrite it, i removed the / at the end of RCON_HOST but it is still not working, the problem appears to be in the environment, but i dont know what is exactly the problem... – Thejuanvisu Jun 04 '21 at 09:58
  • I did exactly copied your contents and it's been created with no issues. Could you please add your complete `docker-compose` file? – Saeed Jun 04 '21 at 10:08
  • Thats strange, that part is just the part that doesnt work, when i remove it the docker compose workse, i will edit the post to add the entire code then. – Thejuanvisu Jun 04 '21 at 10:47
  • Here is my code, i am not able to paste it properly on the post: https://github.com/thejuanvisu/Docker-Compose-Minecraftserver-Prometheus-Graphana/blob/main/docker-compose.yml – Thejuanvisu Jun 04 '21 at 11:01
  • You said The line 16 is `image: joshi425/minecraft_exporter` but I see it's another thing – Saeed Jun 04 '21 at 11:34

0 Answers0