40 lines
1.7 KiB
Markdown
40 lines
1.7 KiB
Markdown
|
# Advanced Devcontainer Configuration
|
||
|
|
||
|
This folder contains opinionated advanced configuration options for the devcontainer. If you just want to edit a config and don't care about the details, you can use the [essential configuration options](../../essential/) instead.
|
||
|
|
||
|
## Why does this exist?
|
||
|
|
||
|
There are a few goals for this configuration:
|
||
|
|
||
|
### Make it as close to the pipeline environment as possible
|
||
|
|
||
|
This ensures that the same versions of tools are used in the devcontainer as in the pipeline.
|
||
|
|
||
|
### Allow for caching
|
||
|
|
||
|
Terraform and terraform plugins are cached across projects on the local machine. This means that if you switch between projects, you don't have to download the same terraform version and plugins again.
|
||
|
|
||
|
### Make development easier
|
||
|
|
||
|
We don't want to have to install all tools and dependencies on our local machine. Instead we want to open a devcontainer and have everything ready to go. This includes linting, formatting and various plugins for vscode.
|
||
|
|
||
|
### Make the devcontainer nice to use
|
||
|
|
||
|
This is more related to personal preference regarding the shell and vscode. The basic linux devcontainer shell is not very nice to use so zsh, oh-my-zsh and the powerlevel10k theme are used to make it nicer.
|
||
|
|
||
|
## Included Tools
|
||
|
|
||
|
- Installs various vscode extensions like linting, formatting, git, etc.
|
||
|
- Configures the zsh shell with oh-my-zsh and the powerlevel10k theme
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
### VSCode
|
||
|
|
||
|
- Open the project in vscode and click on the button in the bottom left corner.
|
||
|
- Select `Reopen in Container`
|
||
|
- Choose `advanced`
|
||
|
- Wait for the devcontainer to build.
|
||
|
- After the build is finished for the first time, make sure to open a new terminal in vscode to make sure all nix tools are available.
|
||
|
- After that you can use the terminal and vscode as usual.
|