Created
April 10, 2019 12:17
-
-
Save alirezameskin/2c77314cc2c3a1655f114582bd64d3d6 to your computer and use it in GitHub Desktop.
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
val interpreter = spotifyInterpreter(DefaultDockerClient.fromEnv().build()) | |
val program = for { | |
_ <- pull("busybox:latest") | |
cntr <- run("busybox", "sh", "-c", "while :; do sleep 1; done") | |
res <- exec(cntr, "date") | |
_ <- kill(cntr) | |
_ <- remove(cntr) | |
} yield res | |
val date:Try[String] = program.foldMap(Interpreter) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment