- Docker - https://docs.docker.com/desktop/install/mac-install/
- VSCode
- VSCode extension: Dev Containers
This gist will contain two options - dbt Core or dbt Cloud CLI The following steps are required by both:
- Create a new folder in your dbt code repository called
.devcontainer - Copy
devcontainer.json,postCreateCommand.sh,requirements.txtinto.devcontainer/ - If core then copy
profiles.yml. If cloud then copydbt_cloud.yml. You can also choose to place both inside.devcontainer/ - Update the yml file with your own connection details
- Update the
PLATFORMinpostCreateCommand.sh- either "cloud" or "core" - Open up the dbt code repository in VS Code ensuring that
.devcontainer/is within the root directory - Click "Open Remote Window" button in the bottom left
After the initialisation runs you should be in a Development Docker Container woohoo! Try running dbt --help to check that the correct dbt is installed
If using core you may need to reload the VSCode window for dbt Power User to work. You can do this by pressing F1 and running "Reload Window".
- The
profiles.ymlanddbt_cloud.ymlare symlinked meaning you can change the values directly to the files inside.devcontainer/and they will be reflected in~/.dbt- no copying required. - Rebuild the container if you make changes to
postCreateCommand.sh