Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve "Can't separate key from value" in docker

After upgrading my docker desktop, I get an error when running docker-compose up. My usual setup consists of microservices controlled with the docker-compose command. When I run docker-compose up, all the containers are started. After updating my docker desktop, I get:

Can't separate key from value 

while running docker-compose up. How do I fix this?

like image 981
AthulMuralidhar Avatar asked Jul 01 '21 08:07

AthulMuralidhar


People also ask

How do you stop the container in detached mode?

Default Mode. Pressing CTRL-c is the usual way of ending a session. But, if we've launched our container without the -d or -it option, the CTRL-c command stops the container instead of disconnecting from it.

What is -- RM flag in Docker?

The --rm flag is there to tell the Docker Daemon to clean up the container and remove the file system after the container exits. This helps you save disk space after running short-lived containers like this one, that we only started to print "Hello, World!".

Can we remove the paused container from Docker?

If we want to pause the processes running inside the container, we can use the “docker pause” command. To unpause the container, use “docker unpause” command.


2 Answers

Check for the version number of docker and if its 3.4+ then the docker compose v2 is enabled by default. To disable it, go to > docker desktop > preferences > experimental features > un-check "use Docker Compose V2" option. This is a move by docker hub to incorporate docker-compose as docker compose and may cause problems to your usual workflow. Enjoy :)

like image 76
AthulMuralidhar Avatar answered Oct 17 '22 13:10

AthulMuralidhar


Just in case if anyone else (like me) run into this issue:

Check the local (to docker-compose.yaml) .env file, is there a VARIABLE without mapping? If so... remove it or give it a value...

like image 44
Oleg Butuzov Avatar answered Oct 17 '22 11:10

Oleg Butuzov