A simple, elegant counter with support for counting multiple things at once.
0

Configure Feed

Select the types of activity you want to include in your feed.

[skip ci] Move `.venv` to project directory

The last devcontainer created an initial `.venv` in the top level `/workspaces`
folder to avoid having the `.venv` hidden when VS Code mounted in the project
files.

Now, `poetry install` runs after the container is created so that the `.venv`
stays within the project directory. The anticipated location of the `.venv` is
added to the `PATH` during the Docker build via a build argument provided in the
`devcontainer.json` file that evaluates to the project name. As a result, this
devcontainer setup is now portable between projects!

Joseph Hale (Jun 1, 2022, 8:52 PM UTC) ab348649 98350d70

+8 -6
+3 -5
.devcontainer/Dockerfile
··· 1 1 FROM jhale1805/python-poetry:1.1.13-py3.8-slim 2 - ENV PROJECT_ROOT_DIR=/workspaces 2 + ARG PROJECT_FOLDER_NAME 3 + ENV PROJECT_ROOT_DIR=/workspaces/$PROJECT_FOLDER_NAME 3 4 4 5 RUN apt update \ 5 - && apt install git --assume-yes --no-install-recommends 6 + && apt install git make --assume-yes --no-install-recommends 6 7 7 8 WORKDIR $PROJECT_ROOT_DIR 8 9 ENV PATH="$PROJECT_ROOT_DIR/.venv/bin:$PATH" 9 - 10 - COPY poetry.lock pyproject.toml ./ 11 - RUN poetry install
+5 -1
.devcontainer/devcontainer.json
··· 2 2 // How to build the devcontainer 3 3 "build": { 4 4 "dockerfile": "Dockerfile", 5 + "args": { 6 + // Source: https://code.visualstudio.com/docs/remote/devcontainerjson-reference#_variables-in-devcontainerjson 7 + "PROJECT_FOLDER_NAME": "${containerWorkspaceFolderBasename}" 8 + }, 5 9 "context": ".." 6 10 }, 7 - "postCreateCommand": "pre-commit install", 11 + "postCreateCommand": "poetry install && pre-commit install", 8 12 9 13 // VS Code tooling and settings to include automatically. 10 14 "extensions": [