charmbracelet / vhs

Your CLI home video recorder 📼
MIT License
15.24k stars 258 forks source link

vhs hanging indefinitely when run from inside of a Docker container #350

Open kyle-figure opened 1 year ago

kyle-figure commented 1 year ago

Describe the bug VHS hangs indefinitely and does not run any commands after I execute the binary on a tape file.

Setup Please complete the following information along with version numbers, if applicable.

To Reproduce Steps to reproduce the behavior:

  1. Download Debian from Github Release Page: https://github.com/charmbracelet/vhs/releases/download/v0.6.0/vhs_0.6.0_amd64.deb
  2. sudo dpkg -i vhs_0.6.0_amd64.deb
  3. vhs new demo.tape
  4. vhs demo.tape
  5. Terminal hangs

Expected behavior Run through commands in .tape file and output a .gif file.

Screenshots image

Additional context I can successfully run the same tape using the Docker image: docker run --rm -v $PWD:/vhs ghcr.io/charmbracelet/vhs demo.tape

I am running the vhs command inside of an Ubuntu 22.04 Docker container. When running vhs outside of the Docker container on my local host machine, this issue does not occur.

balupton commented 1 year ago

I'm having the same issue, just on macOS Terminal.

> vhs --version
vhs version v0.6.0 (d42375a)
eread commented 1 month ago

@kyle-figure @balupton Did you ever figure out why vhs hangs in Docker containers?

balupton commented 1 month ago

@eread no. I moved to https://asciinema.org

kyle-figure commented 1 month ago

@eread On my side, I realized after some experimentation that vhs would hang sometimes when I killed the process by spamming Ctrl+C. Even though the main process was killed, another process spawned from VHS would keep running and never exit. After getting in this state, any new VHS instances launched would hang indefinitely. I saw this behavior both inside and outside of the Docker container, so I don't think it's related to Docker at all.

eread commented 1 month ago

@eread On my side, I realized after some experimentation that vhs would hang sometimes when I killed the process by spamming Ctrl+C. Even though the main process was killed, another process spawned from VHS would keep running and never exit. After getting in this state, any new VHS instances launched would hang indefinitely. I saw this behavior both inside and outside of the Docker container, so I don't think it's related to Docker at all.

Thanks @kyle-figure. I've gotten it to work fine within a Docker image based off Ubuntu. The problem seems to be a dependency that's shipped with Alpine Linux.

The VHS Docker image appears to be mostly Debian: https://github.com/charmbracelet/vhs/blob/main/Dockerfile, so it might be the fact that Alpine Linux is musl libc rather than GNU libc.