File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 " ionide.ionide-paket" ,
2323 " github.vscode-pull-request-github" ,
2424 " paolodellepiane.fantomas-fmt" ,
25- " ms-azuretools.vscode-cosmosdb"
25+ " ms-azuretools.vscode-cosmosdb" ,
26+ " ms-azuretools.vscode-docker"
2627 ],
2728
2829 // Use 'forwardPorts' to make a list of ports inside the container available locally.
2930 // "forwardPorts": [],
3031
3132 // Use 'postCreateCommand' to run commands after the container is created.
32- "postCreateCommand" : " dotnet tool restore && dotnet restore && ./.devcontainer/start.sh" ,
33+ "postCreateCommand" : " dotnet tool restore && dotnet restore" ,
34+
35+ "postStartCommand" : " ./.devcontainer/start.sh" ,
3336
3437 // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3538 "remoteUser" : " vscode"
Original file line number Diff line number Diff line change @@ -2,35 +2,35 @@ version: '3'
22
33services :
44 app :
5- build :
5+ build :
66 context : .
77 dockerfile : Dockerfile
88 args :
9- USER_UID : 1000
10- USER_GID : 1000
11- VARIANT : " 6.0"
9+ USER_UID : 1000
10+ USER_GID : 1000
11+ VARIANT : " 6.0"
1212
1313 init : true
1414 volumes :
15- - /var/run/docker.sock:/var/run/docker-host.sock
16- - ..:/workspace:cached
15+ - /var/run/docker.sock:/var/run/docker-host.sock
16+ - ..:/workspace:cached
1717
1818 entrypoint : /usr/local/share/docker-init.sh
1919 command : sleep infinity
2020 environment :
21- # These names aren't special - they're just used in the Node app to configure the CosmosClient
22- COSMOS__ENDPOINT : https://cosmos:8081
2321 # This is the publicly documented emulator key
2422 COSMOS__KEY : ' C2y6yDjf5/R+ob0N8A7Cgv30VRDJIWEHLM+4QDU5DE2nQ9nDuVTqobD4b8mGGyPMbIZnqyMsEcaGQy67XIw/Jw=='
2523
2624 network_mode : service:cosmos
25+
2726 cosmos :
27+ container_name : cosmos
2828 image : mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
2929 mem_limit : 3g
3030 cpu_count : 2
3131 environment :
32- AZURE_COSMOS_EMULATOR_PARTITION_COUNT : 10
33- AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE : " true"
32+ AZURE_COSMOS_EMULATOR_PARTITION_COUNT : 10
33+ AZURE_COSMOS_EMULATOR_ENABLE_DATA_PERSISTENCE : " true"
3434 volumes :
35- # Forwards the local Docker socket to the container.
36- - /var/run/docker.sock:/var/run/docker-host.sock
35+ # Forwards the local Docker socket to the container.
36+ - /var/run/docker.sock:/var/run/docker-host.sock
Original file line number Diff line number Diff line change 22
33set -euxo pipefail
44
5+ COSMOS__ENDPOINT=https://$( docker inspect cosmos -f ' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ) :8081
6+
57# Try to get the emulator cert in a loop
68until sudo curl -ksf " ${COSMOS__ENDPOINT} /_explorer/emulator.pem" -o ' /usr/local/share/ca-certificates/emulator.crt' ; do
79 echo " Downloading cert from $COSMOS__ENDPOINT "
810 sleep 1
911done
1012
1113sudo update-ca-certificates
14+
15+ echo ' { "Cosmos": { "EndPoint" : "' $COSMOS__ENDPOINT ' " } }' >> ./samples/FSharp.CosmosDb.Samples/appsettings.Development.json
You can’t perform that action at this time.
0 commit comments