diff --git a/README.md b/README.md index 394fd0d..df0e0cc 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,7 @@ - [alpine-git](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-git) - [alpine-gpg](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-gpg) - [alpine-jq](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-jq) +- [alpine-lazygit](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-lazygit) - [alpine-mage2postman](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-mage2postman) - [alpine-magento-cloud-cli](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-magento-cloud-cli) - [alpine-n98-magerun2](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-n98-magerun2) diff --git a/src/alpine-lazygit/README.md b/src/alpine-lazygit/README.md new file mode 100644 index 0000000..77de33f --- /dev/null +++ b/src/alpine-lazygit/README.md @@ -0,0 +1,20 @@ + +# alpine-lazygit (alpine-lazygit) + +Installs lazygit on alpine + +## Example Usage + +```json +"features": { + "ghcr.io/cirolosapio/devcontainers-features/alpine-lazygit:0": {} +} +``` + + + + + +--- + +_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/cirolosapio/devcontainers-features/blob/main/src/alpine-lazygit/devcontainer-feature.json). Add additional notes to a `NOTES.md`._ diff --git a/src/alpine-lazygit/devcontainer-feature.json b/src/alpine-lazygit/devcontainer-feature.json new file mode 100644 index 0000000..0d8f64a --- /dev/null +++ b/src/alpine-lazygit/devcontainer-feature.json @@ -0,0 +1,10 @@ +{ + "name": "alpine-lazygit", + "id": "alpine-lazygit", + "version": "0.0.1", + "description": "Installs lazygit on alpine", + "documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-lazygit", + "installsAfter": [ + "ghcr.io/cirolosapio/devcontainers-features/alpine-ohmyzsh" + ] +} \ No newline at end of file diff --git a/src/alpine-lazygit/install.sh b/src/alpine-lazygit/install.sh new file mode 100644 index 0000000..2c01b0c --- /dev/null +++ b/src/alpine-lazygit/install.sh @@ -0,0 +1,21 @@ +#!/bin/sh + +set -e + +echo "Activating feature 'alpine-lazygit'" + +apk --no-cache add lazygit + +if command -v zsh &> /dev/null; then + if [ -z "$_CONTAINER_USER_HOME" ]; then + if [ -z "$_CONTAINER_USER" ]; then + _CONTAINER_USER_HOME=/root + else + _CONTAINER_USER_HOME=$(getent passwd $_CONTAINER_USER | cut -d: -f6) + fi + fi + + echo $'\nalias lg=lazygit' >> $_CONTAINER_USER_HOME/.zshrc +fi + +echo 'Done!' \ No newline at end of file