I would like to get automate a process where I launch my container, get its id and see the logs, to make sure my application correctly started. Why I do is :
- docker run --name my-container
- docker ps so I can get the container id
- docker logs to see the logs.
I want to automate the last 2 points. I am tired of doing this manually.
I see that we can the container id with
docker ps -aqf "name=my-container". How to pipe the result of this command to
I have tried many things like :
docker logs -f < docker ps -aqf "name=my-container" and the error that I have is :
the file cdfff3s23r does not exists
Or something like this :
docker logs -f | docker ps -aqf "name=my-container"
Any help would be appreciated, thx