Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add devcontainer for Autoware docs #531

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#Mkdocs
/site/

# JetBrains IDEs
/.idea/

Expand Down
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
Loading