Structurizr as a dev container feature #125
-
DescriptionHi! It would be nice if instead of using prebuild containers we could use devcontainer feature (https://containers.dev/features). In this case we can keep using our devcontianer images but with preinstalled CLI. PriorityLow ResolutionI have no budget, please add this feature for free More informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
You might be interested in https://github.com/evilpilaf/structurizr-remotecontainer (linked to from https://github.com/structurizr/cli/blob/master/docs/containers.md). |
Beta Was this translation helpful? Give feedback.
-
well - indeed - I understand what you mean, but here is the point. The root container may be different . Someones writes java, someone uses Node, we all use different base containers. But feature approach allows us to share features among base containers actually |
Beta Was this translation helpful? Give feedback.
-
Dev containers isn't something that I use, but you're welcome to add support. |
Beta Was this translation helpful? Give feedback.
-
This is possible today, it just takes some time during initial devcontainer creation. In your {
"features": {
"ghcr.io/meaningful-ooo/devcontainer-features/homebrew:2": {}
},
"postCreateCommand": "brew install structurizr-cli"
} This will install homebrew via the feature, and install the structurizr-cli via homebrew after the container is created. As a bonus, you can also add version: '3.8'
services:
app:
depends_on:
- lite
build:
context: ..
dockerfile: .devcontainer/Dockerfile
volumes:
- ../..:/workspaces:cached
command: sleep infinity
network_mode: service:lite
lite:
image: structurizr/lite
volumes:
- ../data:/usr/local/structurizr
|
Beta Was this translation helpful? Give feedback.
This is possible today, it just takes some time during initial devcontainer creation. In your
devcontainer.json
file, simply add:This will install homebrew via the feature, and install the structurizr-cli via homebrew after the container is created.
As a bonus, you can also add
structurizr/lite
in yourdocker-compose.yml
and have it serve up the content alongside your normal devcontainer. Just modify thedata
directory volume mount to wherever you have your workspace files in the repo.