Skip to content

Commit

Permalink
Add configuration for GitHub Codespaces
Browse files Browse the repository at this point in the history
  • Loading branch information
medihack committed Jun 10, 2024
1 parent 9141e51 commit 0a02712
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM mcr.microsoft.com/devcontainers/python:3.12

# Install dependency to make bash completion work with invoke
RUN apt-get update && \
export DEBIAN_FRONTEND=noninteractive && \
apt-get install -y bash-completion && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

USER vscode

# pipx is already installed in the base devcontainers Python image
RUN pipx install invoke && \
invoke --print-completion-script=bash >> ~/.bash_completion

RUN pipx install poetry && \
poetry completions bash >> ~/.bash_completion
40 changes: 40 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {
// Install Docker CE instead of an (by default) older Moby version
"moby": false
},
"ghcr.io/devcontainers/features/node:1": {}
},
// https://github.com/orgs/community/discussions/50403
// "initializeCommand": "docker system prune --all --force",
"postCreateCommand": "poetry install && poetry run invoke init-workspace",
"customizations": {
"vscode": {
"extensions": [
"batisteo.vscode-django",
"charliermarsh.ruff",
"davidanson.vscode-markdownlint",
"eamodio.gitlens",
"esbenp.prettier-vscode",
"formulahendry.auto-close-tag",
"formulahendry.auto-rename-tag",
"foxundermoon.shell-format",
"jock.svg",
"mhutchie.git-graph",
"mikestead.dotenv",
"monosans.djlint",
"ms-azuretools.vscode-docker",
"ms-pyright.pyright",
"ms-python.python",
"streetsidesoftware.code-spell-checker",
"tamasfe.even-better-toml",
"wayou.vscode-todo-highlight",
"xabikos.javascriptsnippets"
]
}
}
}

0 comments on commit 0a02712

Please sign in to comment.