diff --git a/.devcontainer/README.md b/.devcontainer/README.md new file mode 100644 index 00000000..a00d1e35 --- /dev/null +++ b/.devcontainer/README.md @@ -0,0 +1,23 @@ +# Dev Containers + +> The Visual Studio Code Dev Containers extension lets you use a container as a full-featured development environment. It allows you to open any folder inside (or mounted into) a container and take advantage of Visual Studio Code's full feature set. A devcontainer.json file in your project tells VS Code how to access (or create) a development container with a well-defined tool and runtime stack. This container can be used to run an application or to separate tools, libraries, or runtimes needed for working with a codebase. + +Source: [Developing inside a Container](https://code.visualstudio.com/docs/devcontainers/containers) + +## Tips and Tricks + +[Dev Containers Tips and Tricks](https://code.visualstudio.com/docs/devcontainers/tips-and-tricks) + +## Troubleshooting + +### "You don't have enough free space in /var/cache/apt/archives/" + +Check the Docker Build Cache: +```sh +docker system df +``` + +If the cache is full, clean it: +```sh +docker builder prune --all +``` diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000..314766e9 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,3 @@ +* text=auto eol=lf +*.{cmd,[cC][mM][dD]} text eol=crlf +*.{bat,[bB][aA][tT]} text eol=crlf diff --git a/ansible/inventory/group_vars/debian/vars.yaml b/ansible/inventory/group_vars/debian/vars.yaml index fd953c9f..7d90599f 100644 --- a/ansible/inventory/group_vars/debian/vars.yaml +++ b/ansible/inventory/group_vars/debian/vars.yaml @@ -41,6 +41,7 @@ dev_apt_packages: - make - python3-pip - python3-venv + - pipx - pre-commit - shellcheck - tshark diff --git a/docs/setup.md b/docs/setup.md index d13d7886..d85e27e7 100644 --- a/docs/setup.md +++ b/docs/setup.md @@ -39,6 +39,7 @@ The repository includes a [devcontainer](https://code.visualstudio.com/docs/devc Using Visual Studio Code, the [Dev Containers Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) and Docker the development (e.g. adding more services, building the documentation) and administration tasks (e.g. running an Ansible playbook) can be performed on any environment without additional software installation. Follow the [Dev Containers tutorial](https://code.visualstudio.com/docs/devcontainers/tutorial) to get started. +For troubleshooting, tips and tricks see [Dev Containers](../.devcontainer/README.md). Note: the resulting container image is pretty large (4+ GB) as it includes all software configured in `ansible/inventory/group_vars/debian/vars.yaml`.