diff --git a/README.md b/README.md index df0e0cc..0e5bc62 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,7 @@ - [alpine-broot](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-broot) - [alpine-ctop](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-ctop) - [alpine-curl](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-curl) +- [alpine-d2](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-d2) - [alpine-deno](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-deno) - [alpine-docker-outside-of-docker](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-docker-outside-of-docker) - [alpine-fswatch](https://github.com/cirolosapio/devcontainers-features/pkgs/container/devcontainers-features%2Falpine-fswatch) diff --git a/src/alpine-d2/README.md b/src/alpine-d2/README.md new file mode 100644 index 0000000..6db9ee9 --- /dev/null +++ b/src/alpine-d2/README.md @@ -0,0 +1,20 @@ + +# alpine-d2 (alpine-d2) + +Installs d2 on alpine + +## Example Usage + +```json +"features": { + "ghcr.io/cirolosapio/devcontainers-features/alpine-d2:0": {} +} +``` + + + + + +--- + +_Note: This file was auto-generated from the [devcontainer-feature.json](https://github.com/cirolosapio/devcontainers-features/blob/main/src/alpine-d2/devcontainer-feature.json). Add additional notes to a `NOTES.md`._ diff --git a/src/alpine-d2/devcontainer-feature.json b/src/alpine-d2/devcontainer-feature.json new file mode 100644 index 0000000..eeb0465 --- /dev/null +++ b/src/alpine-d2/devcontainer-feature.json @@ -0,0 +1,7 @@ +{ + "name": "alpine-d2", + "id": "alpine-d2", + "version": "0.0.1", + "description": "Installs d2 on alpine", + "documentationURL": "https://github.com/cirolosapio/devcontainers-features/tree/main/src/alpine-d2" +} \ No newline at end of file diff --git a/src/alpine-d2/install.sh b/src/alpine-d2/install.sh new file mode 100644 index 0000000..f2d1547 --- /dev/null +++ b/src/alpine-d2/install.sh @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +echo "Activating feature 'alpine-d2'" + +apk --no-cache add make curl ncurses + +VERSION=v0.6.7 +OS=linux +ARCH=amd64 + +curl -fsSLO "https://github.com/terrastruct/d2/releases/download/$VERSION/d2-$VERSION-$OS-$ARCH.tar.gz" +tar -xzf "d2-$VERSION-$OS-$ARCH.tar.gz" +make -sC "d2-$VERSION" install + +echo 'Done!'