elkolotfi / piggymetrics

Microservice Architecture with Spring Boot, Spring Cloud and Docker
https://piggymetrics.tk
MIT License
2 stars 0 forks source link

Fix MongoDb containers [init.sh] #1

Closed elkolotfi closed 5 years ago

elkolotfi commented 5 years ago

When I launch MongoDb containers from a windows machine (using DockerTools vm) they stop working due to a problem when runing init.sh script.

elkolotfi commented 5 years ago

After analyzing it seems that the problem is due to file formating of init.sh on windows. In fact, the OS adds a "bad" end of line that disturbs the execution of the script on linux.

The solution to this is to use dos2unix to make sure that the file is wel formated before executing it