Created
November 17, 2017 11:19
-
-
Save felipebn/3aa7a0031d58e636b58d7eeec894c66a to your computer and use it in GitHub Desktop.
Powershel - How to get docker ps output first column OR How to get docker contianer ID from docker ps
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Example for a container with '/keycloak' in the name | |
docker logs -f $(docker ps | Select-String /keycloak | % { $_.ToString().Split(" ") | select -first 1}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment