Skip to content

Commit

Permalink
Add alpine-d2 feature
Browse files Browse the repository at this point in the history
  • Loading branch information
cirolosapio committed Oct 20, 2024
1 parent 1fe03db commit e78f93d
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
20 changes: 20 additions & 0 deletions src/alpine-d2/README.md
Original file line number Diff line number Diff line change
@@ -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`._
7 changes: 7 additions & 0 deletions src/alpine-d2/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -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"
}
17 changes: 17 additions & 0 deletions src/alpine-d2/install.sh
Original file line number Diff line number Diff line change
@@ -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!'

0 comments on commit e78f93d

Please sign in to comment.