mattermost / mattermost-gitpod-config

5 stars 10 forks source link

Circumvent docker TTY problem #4

Closed mickmister closed 2 years ago

mickmister commented 2 years ago

Summary

When running make run-server, Gitpod is showing this error when spinning up the project's Docker containers:

Starting docker containers
go run ./build/docker-compose-generator/main.go postgres minio  | docker-compose -f docker-compose.makefile.yml -f /dev/stdin  run --rm start_dependencies
[+] Running 3/3
 ⠿ Network mattermost-server_mm-test  Created                                                                               0.2s
 ⠿ Container mattermost-postgres      Created                                                                               2.8s
 ⠿ Container mattermost-minio         Created                                                                               2.8s
[+] Running 2/2
 ⠿ Container mattermost-minio     Started                                                                                   1.0s
 ⠿ Container mattermost-postgres  Started                                                                                   1.0s
the input device is not a TTY
make: *** [Makefile:193: start-docker] Error 1

From reading https://github.com/docker/compose/issues/5696#issuecomment-425112003, I've changed this to run the docker-compose run command manually, with the -T flag. This makes it so the Docker containers spin up without the TTY error.

We then run make run-server with the MM_NO_DOCKER variable set to true, signaling that we want the script to skip creating the Docker containers, and assume they are already running.