File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 // "forwardPorts": [],
3131
3232 // Use 'postCreateCommand' to run commands after the container is created.
33- "postCreateCommand" : " dotnet tool restore && dotnet restore" ,
34-
35- "postStartCommand" : " ./.devcontainer/start.sh" ,
33+ "postCreateCommand" : " dotnet tool restore && dotnet restore && ./.devcontainer/start.sh" ,
3634
3735 // Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
3836 "remoteUser" : " vscode"
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ services:
2424 network_mode : service:cosmos
2525
2626 cosmos :
27- container_name : cosmos
27+ container_name : fsharp_cosmos
2828 image : mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest
2929 mem_limit : 3g
3030 cpu_count : 2
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
5+ ipAddress =https://$( docker inspect fsharp_cosmos -f ' {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ) :8081
66
77# Try to get the emulator cert in a loop
8- until sudo curl -ksf " ${COSMOS__ENDPOINT } /_explorer/emulator.pem" -o ' /usr/local/share/ca-certificates/emulator.crt' ; do
9- echo " Downloading cert from $COSMOS__ENDPOINT "
8+ until sudo curl -ksf " ${ipAddress } /_explorer/emulator.pem" -o ' /usr/local/share/ca-certificates/emulator.crt' ; do
9+ echo " Downloading cert from $ipAddress "
1010 sleep 1
1111done
1212
1313sudo update-ca-certificates
1414
1515if [ ! -f ./samples/FSharp.CosmosDb.Samples/appsettings.Development.json ]
1616then
17- echo ' { "Cosmos": { "EndPoint" : "' $COSMOS__ENDPOINT ' " } }' >> ./samples/FSharp.CosmosDb.Samples/appsettings.Development.json
17+ echo ' { "Cosmos": { "EndPoint" : "' $ipAddress ' " } }' >> ./samples/FSharp.CosmosDb.Samples/appsettings.Development.json
1818fi
You can’t perform that action at this time.
0 commit comments