Skip to content

Instantly share code, notes, and snippets.

@DenisNovac
Last active November 19, 2021 04:58
Show Gist options
  • Save DenisNovac/bbe34f6024e939e310e98ac42f28eb24 to your computer and use it in GitHub Desktop.
Save DenisNovac/bbe34f6024e939e310e98ac42f28eb24 to your computer and use it in GitHub Desktop.
Run utility inside docker and then exit from container without closing
#!/bin/bash
# run utility in docker (sbt from hseeberger container) in this folder
docker run -it --rm -v "$(pwd)":/root --network host hseeberger/scala-sbt:15.0.2_1.4.9_2.13.5 sbt
# do something with it (perhaps start compiling or running application)
# press combinations in order:
# ctrl + p, ctrl + q
# interactive mode now demonized, see the running container:
docker ps
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment