Skip to content

Commit

Permalink
Add development container for docs
Browse files Browse the repository at this point in the history
Signed-off-by: Dogan Ulus <[email protected]>
  • Loading branch information
doganulus committed Mar 8, 2024
1 parent 71c382d commit 6facff1
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:22.04

ARG USER=autoware
ENV HOME /home/$USER
ENV PATH=$PATH:/home/$USER/.local/bin

RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install \
sudo \
git \
python3 \
python3-pip \
python-is-python3 \
&& apt-get autoremove -y && apt-get clean -y && rm -rf /var/lib/apt/lists/*

RUN groupadd work -g 1000 \
&& useradd -ms /bin/bash $USER -g 1000 -u 1000 \
&& printf "$USER:$USER" | chpasswd \
&& printf "$USER ALL= NOPASSWD: ALL\\n" >> /etc/sudoers

USER $USER
WORKDIR $HOME

RUN python -m pip install --user --no-cache-dir pre-commit
20 changes: 20 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "Autoware Docs",
"dockerFile": "Dockerfile",
"context": "..",
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "/bin/bash"
},
"extensions": [
"redhat.vscode-yaml",
"esbenp.prettier-vscode",
"DavidAnson.vscode-markdownlint"
]
}
},
"forwardPorts": [8000],
"postCreateCommand": "pip install --user -r requirements.txt && pre-commit install",
"remoteUser": "autoware"
}
15 changes: 15 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mkdocs
mkdocs-material
mkdocs-minify-plugin
mkdocs-redirects
mkdocs-git-revision-date-localized-plugin
mkdocs-awesome-pages-plugin
mkdocs-exclude
mkdocs-macros-plugin
mkdocs-video
mkdocs-same-dir
markdown<3.4
fontawesome-markdown
python-markdown-math
mdx_truly_sane_lists
plantuml-markdown

0 comments on commit 6facff1

Please sign in to comment.