dbudwin/RoboHome-Web

docker-compose failing due to container name mismatch

Closed this issue · 2 comments

I couldn't get the app running by using the StartDockerAndRunTests.sh file provided.

Expected Behavior

The web.sh command in StartDockerAndRunTests.sh file should have returned the web container name that was generated during docker-compose.

Current Behavior

The commands in the StartDockerAndRunTests.sh fail when it encounters lines with web.sh, because the container name for the laravel app during docker-compose up does not match the name that is generated by the web.sh file.
generated name: robohome-web_web_1_ae1757cab9c1
expected name: robohomeweb_web_1
I'm using the latest version of docker-compose btw. Could you please tell me if i'm missing anything here?

Possible Solution

One workaround I figured was to name the container in the compose yml file with
container_name: robohomeweb_web_1

Good find! It was working for me using Docker 17.* but then I upgraded this morning to test this issue to Docker 18.06.1-ce and got the same issue you had. If you want to attempt your suggested solution, it would be a great way to participate in Hacktoberfest!

 ~/Documents/code/RoboHome-Web ./StartDockerAndRunTests.sh                                                                                                            ✓  3927  14:43:37
Recreating robohomeweb_db_1           ... done
Recreating robohomeweb_chromedriver_1 ... done
Recreating robohomeweb_web_1          ... done
Recreating robohomeweb_dbadmin_1      ... done
Error: No such container: robohomeweb_web_1
Error: No such container: robohomeweb_web_1
Error: No such container: robohomeweb_web_1
Error: No such container: robohomeweb_web_1
Error: No such container: robohomeweb_web_1

@dbudwin Thanks! Submitted a PR for the issue.