Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
FROM mcr.microsoft.com/devcontainers/python:3.11

ARG USER=vscode
USER $USER
ARG HOME="/home/$USER"

RUN cd ${HOME} \
&& python -m venv env \
&& . env/bin/activate \
&& python -m pip install --upgrade pip \
&& python -m pip install --upgrade azdev

ENV PATH="${HOME}/env/bin:$PATH"
28 changes: 28 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"name": "Azure CLI Dev Environment",
"build": {
"dockerfile": "Dockerfile",
"context": ".."
},
"customizations": {
"vscode": {
"settings": {
"python.terminal.activateEnvInCurrentTerminal": true,
"python.defaultInterpreterPath": "/home/vscode/env/bin/python"
},
"extensions": [
"editorconfig.editorconfig",
"github.vscode-pull-request-github",
"ms-azuretools.vscode-docker",
"ms-python.python",
"ms-python.pylint",
"ms-python.flake8",
"eamodio.gitlens"
]
}
},
"features": {
"github-cli": "latest"
},
"postCreateCommand": ".devcontainer/setupCommand.sh"
}
7 changes: 7 additions & 0 deletions .devcontainer/setupCommand.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash
. /home/vscode/env/bin/activate

cd /workspaces
git clone https://github.com/Azure/azure-cli-extensions.git azure-cli-extensions
azdev setup --cli ./azure-cli --repo ./azure-cli-extensions
az --version
35 changes: 35 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,41 @@
"WaitOnNormalExit",
"RedirectOutput"
]
},
{
"name": "Codespace Azure CLI Debug",
"type": "python",
"request": "launch",
"python": "/home/vscode/env/bin/python",
"program": "${workspaceRoot}/src/azure-cli/azure/cli/__main__.py",
"cwd": "${workspaceRoot}",
"args": [
"--help"
],
"console": "integratedTerminal",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
],
"justMyCode": false
},
{
"name": "Codespace Azdev Debug",
"type": "python",
"request": "launch",
"python": "/home/vscode/env/bin/python",
"program": "/home/vscode/env/lib/python3.11/site-packages/azdev/__main__.py",
"cwd": "${workspaceRoot}",
"args": [
"--help"
],
"console": "integratedTerminal",
"debugOptions": [
"WaitOnAbnormalExit",
"WaitOnNormalExit",
"RedirectOutput"
]
}
]
}
Loading