From 13c8ce726bad28185c25aca3930ad911de1621f4 Mon Sep 17 00:00:00 2001 From: Andrew Novoselac Date: Tue, 2 Apr 2024 13:51:02 -0400 Subject: [PATCH] Create a feature for mysql client dependencies --- features/mysql-client/README.md | 24 +++++++++++++++++++ .../mysql-client/devcontainer-feature.json | 6 +++++ features/mysql-client/install.sh | 3 +++ 3 files changed, 33 insertions(+) create mode 100644 features/mysql-client/README.md create mode 100644 features/mysql-client/devcontainer-feature.json create mode 100755 features/mysql-client/install.sh diff --git a/features/mysql-client/README.md b/features/mysql-client/README.md new file mode 100644 index 0000000..e3b6017 --- /dev/null +++ b/features/mysql-client/README.md @@ -0,0 +1,24 @@ +# MySQL Client + +Installs needed client-side dependencies for Rails apps using MySQL. + +NOTE: This feature does not install the dependencies needed for the MySQL Server. For that we recommend running a +service using the official [MySQL docker image](https://hub.docker.com/_/mysql). + +## Example Usage + +```json +"features": { + "ghcr.io/rails/devcontainer/features/mysql-client": {} +} +``` + +## Options + +## Customizations + +## 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/mysql-client/devcontainer-feature.json b/features/mysql-client/devcontainer-feature.json new file mode 100644 index 0000000..d35ed9f --- /dev/null +++ b/features/mysql-client/devcontainer-feature.json @@ -0,0 +1,6 @@ +{ + "id": "mysql-client", + "version": "0.1.0", + "name": "MySQL Client", + "description": "Installs needed client-side dependencies for Rails apps using MySQL" +} diff --git a/features/mysql-client/install.sh b/features/mysql-client/install.sh new file mode 100755 index 0000000..ced2f3e --- /dev/null +++ b/features/mysql-client/install.sh @@ -0,0 +1,3 @@ +apt-get update -y && apt-get -y install --no-install-recommends default-libmysqlclient-dev + +rm -rf /var/lib/apt/lists/*