1

I've got a docker-compose.yml which, when deployed locally as either using stack or compose yields 3 services (parse-server, mongodb, web-app in nginx). I can get logs from those services using docker service logs <id>.

Using the same docker-compose.yml to deploy the stack to Amazon EC2, docker service logs <id> calls to the running services returns nothing. As if I were cat'ing an empty file.

Does anybody know what could cause this and / or how I can fix it?

Darren Black
  • 1,030
  • 1
  • 9
  • 28
  • Are you able to get the logs of a running container on the EC2 machine... ? – Soumen Mukherjee Mar 01 '18 at 17:18
  • When I run 'docker container ls', I'm given a set of containers that don't really belong to me; looks like they're AWS infrastructure. Or should I be accessing / listing my containers in some other way using stacks? – Darren Black Mar 01 '18 at 18:22
  • If you are using the EC2 machine then you should be getting your own containers only... unless you are using the elastic container serivce...and did you mean the elastic container service by Amazon EC2 – Soumen Mukherjee Mar 05 '18 at 10:44

1 Answers1

0

When you deploy a swarm to AWS using the Docker Docs buttons or via cloud, I believe it usually pipes all output to CloudWatch, organized by individual container. This is only helpful if that is how you created your swarm.