rails / devcontainer

MIT License
63 stars 19 forks source link

ffmpeg not found #42

Closed timwis closed 3 months ago

timwis commented 3 months ago

Hi team 👋🏻 I've been setting up the devcontainer on an existing rails project, and noticed that ffmpeg was not available on the command line within the devcontainer. I just setup a fresh rails app to see if I could reproduce and isolate the issue (using rails _7.2.0.beta3_ new devcontainer_test --devcontainer), and it's not available in that devcontainer either.

The reason I believe it's not been installed is because I've tried the following commands:

$ ffmpeg
bash: ffmpeg: command not found

$ apt list --installed | grep ffmpeg

$ dpkg --get-selections | grep ffmpeg

grepping for vips or pop (the other two packages installed by activestorage/install.sh) does find a match; it's just ffmpeg that seems to be missing.

When I run sudo apt-get update && sudo apt-get install ffmpeg after the devcontainer is running, it installs fine.

I'm not familiar enough with devcontainers to know how to diagnose the issue properly, but I've looked through the "Show All Logs..." results in vscode and found this clue in one build:

Screenshot 2024-08-01 at 20 04 33

I tried copying the activestorage feature to a local directory, and using that in my devcontainer.json, then modifying install.sh to add apt-cache policy ffmpeg after apt-get update, and it does look like it's available 🤔

0.179 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
0.205 Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]
0.212 Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB]
0.242 Get:4 http://deb.debian.org/debian bookworm/main arm64 Packages [8688 kB]
0.424 Get:5 http://deb.debian.org/debian bookworm-updates/main arm64 Packages [13.7 kB]
0.424 Get:6 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages [166 kB]
1.002 Fetched 9122 kB in 1s (10.7 MB/s)
1.002 Reading package lists...
1.459 ffmpeg:
1.459   Installed: (none)
1.459   Candidate: 7:5.1.5-0+deb12u1
1.459   Version table:
1.459      7:5.1.5-0+deb12u1 500
1.460         500 http://deb.debian.org/debian bookworm/main arm64 Packages
1.460         500 http://deb.debian.org/debian-security bookworm-security/main arm64 Packages

Any suggestions on how to further diagnose?

andrewn617 commented 3 months ago

@timwis Thank you for the report. I am releasing version 1.0.1 now that will fix this issue.

timwis commented 3 months ago

Oh my goodness - it was the comments?! haha I don't think I'd have thought to try that! Thanks @andrewn617, I appreciate the fix.