-
-
Notifications
You must be signed in to change notification settings - Fork 613
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1532 from jacoverster/basic-devcontainer
Adds basic devcontainer for #1057
- Loading branch information
Showing
7 changed files
with
350 additions
and
122 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,35 @@ | ||
FROM python:3.8 | ||
|
||
ENV POETRY_VERSION=1.6.1 \ | ||
POETRY_NO_INTERACTION=1 \ | ||
POETRY_VIRTUALENVS_IN_PROJECT=false \ | ||
POETRY_VIRTUALENVS_CREATE=false \ | ||
DEBIAN_FRONTEND=noninteractive \ | ||
DISPLAY=:99 | ||
|
||
# Install packages | ||
RUN apt-get update && apt-get install --no-install-recommends -y \ | ||
sudo git build-essential chromium chromium-driver \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
# Create remote user | ||
ARG USERNAME=vscode | ||
ARG USER_UID=1000 | ||
ARG USER_GID=$USER_UID | ||
|
||
RUN groupadd --gid $USER_GID $USERNAME \ | ||
&& useradd --uid $USER_UID --gid $USER_GID -m $USERNAME \ | ||
&& echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \ | ||
&& chmod 0440 /etc/sudoers.d/$USERNAME | ||
|
||
ENV PATH="/home/${USERNAME}/.local/bin:${PATH}" | ||
ENV CHROME_BINARY_LOCATION=/usr/bin/chromium | ||
|
||
# Install nicegui | ||
RUN pip install -U pip && pip install poetry==$POETRY_VERSION | ||
COPY nicegui pyproject.toml poetry.lock README.md ./ | ||
RUN poetry install --all-extras | ||
|
||
USER $USERNAME | ||
|
||
ENTRYPOINT ["poetry", "run", "python", "-m", "debugpy", "--listen" ,"5678", "main.py"] |
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,39 @@ | ||
// For format details, see https://aka.ms/devcontainer.json. | ||
{ | ||
"name": "nicegui-dev", | ||
"build": { | ||
"context": "..", | ||
"dockerfile": "Dockerfile" | ||
}, | ||
"customizations": { | ||
"vscode": { | ||
"extensions": [ | ||
"cschleiden.vscode-github-actions", | ||
"esbenp.prettier-vscode", | ||
"littlefoxteam.vscode-python-test-adapter", | ||
"ms-python.autopep8", | ||
"ms-python.isort", | ||
"ms-python.mypy-type-checker", | ||
"ms-python.pylint", | ||
"ms-python.python", | ||
"ms-python.vscode-pylance", | ||
"samuelcolvin.jinjahtml", | ||
"Vue.volar" | ||
], | ||
"settings": { | ||
"terminal.integrated.defaultProfile.linux": "bash", | ||
"terminal.integrated.shell.linux": "bash", | ||
"terminal.integrated.profiles.linux": { | ||
"bash (container default)": { | ||
"path": "/usr/bin/bash", | ||
"overrideName": true | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
// More info: https://aka.ms/dev-containers-non-root. | ||
"remoteUser": "vscode", | ||
"postCreateCommand": "poetry install --all-extras" | ||
} |
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 |
---|---|---|
|
@@ -9,4 +9,5 @@ tests/media/ | |
venv | ||
.idea | ||
.nicegui/ | ||
*.sqlite* | ||
*.sqlite* | ||
.DS_Store |
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
Oops, something went wrong.