Created
May 30, 2019 07:03
-
-
Save prismofeverything/296ba40c5bb9e9d94b728fbc43895ce2 to your computer and use it in GitHub Desktop.
attach to docker logs
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
(defn attach-params | |
[] | |
(into-array | |
DockerClient$AttachParameter | |
[DockerClient$AttachParameter/LOGS | |
DockerClient$AttachParameter/STDOUT | |
DockerClient$AttachParameter/STDERR | |
DockerClient$AttachParameter/STREAM])) | |
(defn attach-logs | |
([docker id] (attach-logs docker id System/out System/err)) | |
([docker id out err] | |
(let [attach (.attachContainer docker id (attach-params))] | |
(.attach attach out err true)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment