-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added devcontainer support for vscode (#992)
* added devcontainer support * added nodejs & npm to image --------- Co-authored-by: Kyriakos Akriotis <[email protected]>
- Loading branch information
Showing
2 changed files
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# use latest python 3 alpine image. | ||
FROM python:3-alpine | ||
|
||
# install system dependencies. | ||
RUN apk update && apk add --no-cache \ | ||
gcc libc-dev g++ graphviz git bash go imagemagick inkscape ttf-opensans curl fontconfig xdg-utils \ | ||
nodejs npm | ||
|
||
# install go package. | ||
RUN go install github.com/mingrammer/round@latest | ||
|
||
# install fonts | ||
RUN curl -O https://noto-website.storage.googleapis.com/pkgs/NotoSansCJKjp-hinted.zip \ | ||
&& mkdir -p /usr/share/fonts/NotoSansCJKjp \ | ||
&& unzip NotoSansCJKjp-hinted.zip -d /usr/share/fonts/NotoSansCJKjp/ \ | ||
&& rm NotoSansCJKjp-hinted.zip \ | ||
&& fc-cache -fv | ||
|
||
# add go bin to path. | ||
ENV PATH "$PATH:/root/go/bin" | ||
|
||
# project directory. | ||
WORKDIR /usr/src/diagrams | ||
|
||
# Copy the rest of your app's source code from your host to your image filesystem. | ||
COPY . . | ||
|
||
# install python requirements. | ||
RUN pip install black graphviz jinja2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
{ | ||
"name": "diagrams", | ||
"build": { | ||
// Path is relative to the devcontainer.json file. | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"ms-python.python", | ||
"ms-python.debugpy", | ||
"mhutchie.git-graph", | ||
"mutantdino.resourcemonitor", | ||
"tehpeng.diagramspreviewer" | ||
] | ||
} | ||
}, | ||
"workspaceMount": "source=${localWorkspaceFolder},target=/usr/src/diagrams,type=bind", | ||
"workspaceFolder": "/usr/src/diagrams" | ||
} |