From bf5462b60049d0a3cb1fda976c2fe8f4073a4b4a Mon Sep 17 00:00:00 2001 From: Andrew Novoselac Date: Tue, 2 Apr 2024 07:30:56 -0400 Subject: [PATCH] Create feature for activestorage dependencies --- features/activestorage/README.md | 23 +++++++++++++++++++ .../activestorage/devcontainer-feature.json | 6 +++++ features/activestorage/install.sh | 11 +++++++++ 3 files changed, 40 insertions(+) create mode 100644 features/activestorage/README.md create mode 100644 features/activestorage/devcontainer-feature.json create mode 100755 features/activestorage/install.sh diff --git a/features/activestorage/README.md b/features/activestorage/README.md new file mode 100644 index 0000000..b0d8785 --- /dev/null +++ b/features/activestorage/README.md @@ -0,0 +1,23 @@ +# Active Storage + +Installs libvips, ffmpeg and poppler-utils which are required to use Active Storage for Rails apps. + +## Example Usage + +```json +"features": { + "ghcr.io/rails/devcontainer/features/activestorage": {} +} +``` + +## Options + +## Customizations + +### VS Code Extensions + +## OS Support + +This Feature should work on recent versions of Debian/Ubuntu-based distributions with the `apt` package manager installed. + +`bash` is required to execute the `install.sh` script. \ No newline at end of file diff --git a/features/activestorage/devcontainer-feature.json b/features/activestorage/devcontainer-feature.json new file mode 100644 index 0000000..7244218 --- /dev/null +++ b/features/activestorage/devcontainer-feature.json @@ -0,0 +1,6 @@ +{ + "id": "activestorage", + "version": "0.1.0", + "name": "Active Storage", + "description": "Installs utilities needed for Rails Active Storage" +} diff --git a/features/activestorage/install.sh b/features/activestorage/install.sh new file mode 100755 index 0000000..e008bf1 --- /dev/null +++ b/features/activestorage/install.sh @@ -0,0 +1,11 @@ +apt-get update -qq && \ + apt-get install --no-install-recommends -y \ + libvips \ + # For video thumbnails + ffmpeg \ + # For pdf thumbnails. If you want to use mupdf instead of poppler, + # you can install the following packages instead: + # mupdf mupdf-tools + poppler-utils + +rm -rf /var/lib/apt/lists/* \ No newline at end of file