Skip to content

Commit 354ace0

Browse files
authored
chore: add devcontainer (#522)
1 parent 663084b commit 354ace0

File tree

4 files changed

+53
-2
lines changed

4 files changed

+53
-2
lines changed

.devcontainer/devcontainer.json

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
2+
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
3+
{
4+
"name": "Python, .NET, Azure Functions, and Node.js",
5+
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
6+
"image": "mcr.microsoft.com/vscode/devcontainers/python:3.8",
7+
8+
// Features to add to the dev container. More info: https://containers.dev/features.
9+
"features": {
10+
"ghcr.io/devcontainers/features/dotnet:2": {
11+
"version": "8.0"
12+
},
13+
"ghcr.io/jlaundry/devcontainer-features/azure-functions-core-tools:1": {
14+
"version": "4"
15+
},
16+
"ghcr.io/devcontainers/features/node:1": {
17+
"version": "lts"
18+
}
19+
},
20+
21+
// Use 'forwardPorts' to make a list of ports inside the container available locally.
22+
// "forwardPorts": [],
23+
24+
// Use 'postCreateCommand' to run commands after the container is created.
25+
"postCreateCommand": "./.devcontainer/setup.sh",
26+
27+
// Configure tool-specific properties.
28+
"customizations": {
29+
"vscode": {
30+
"extensions": [
31+
"GitHub.copilot",
32+
"ms-python.python",
33+
"ms-azuretools.vscode-azurestorage",
34+
"njpwerner.autodocstring"
35+
]
36+
}
37+
}
38+
39+
// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
40+
// "remoteUser": "root"
41+
}

.devcontainer/setup.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/usr/bin/env bash
2+
3+
pip install -r requirements.txt
4+
5+

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,3 +132,6 @@ appsettings.*.json
132132
/samples/python_durable_bindings/bin/
133133
/samples/python_durable_bindings/.vs/
134134
/samples/python_durable_bindings/obj/
135+
136+
# azurite emulator
137+
__azurite_db_*.json

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,13 @@ Thank you for taking the time to contribute to Durable Functions in [Python](htt
1818

1919
## Pre-requisites
2020

21+
> Alternatively you can use a dev container or [open in GitHub Codespaces](https://codespaces.new/Azure/azure-functions-durable-python).
22+
2123
- OS
2224
- MacOS (or) Windows10 Ubuntu WSL
2325
- Language Runtimes
2426
- .NET Core 2.0
25-
- \>= Python 3.6.x
27+
- \>= Python 3.6.x
2628

2729
Note: Some ML libraries may not be compatible with newer Python versions. Make sure the library is compatible with the Python version.
2830

@@ -35,7 +37,7 @@ Note: Some ML libraries may not be compatible with newer Python versions. Make s
3537
- [Azure Storage Emulator](https://docs.microsoft.com/en-us/azure/storage/common/storage-use-emulator) (or) [Create a storage account in Azure](https://docs.microsoft.com/en-us/azure/storage/common/storage-account-create?tabs=azure-portal)
3638
- [Azure Functions Core Tools](https://github.com/Azure/azure-functions-core-tools) v2.7.x and above.
3739
- [Azure Storage Explorer](https://azure.microsoft.com/en-us/features/storage-explorer/)
38-
40+
3941

4042
## Pull Request Change flow
4143

0 commit comments

Comments
 (0)