Skip to content

Commit

Permalink
Added a condition to allow Docker to fully setup during post-create b…
Browse files Browse the repository at this point in the history
…efore initializing the K3d cluster (#694)

Co-authored-by: Reshma Abdul Rahim <[email protected]>
  • Loading branch information
jasonviviano and Reshrahim authored Oct 24, 2023
1 parent 86f157a commit 3b5c020
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .devcontainer/post-create.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
#!/bin/sh

## Create a k3d cluster
k3d cluster delete
k3d cluster create -p '8081:80@loadbalancer' --k3s-arg '--disable=traefik@server:0'
while (! kubectl cluster-info ); do
# Docker takes a few seconds to initialize
echo "Waiting for Docker to launch..."
k3d cluster delete
k3d cluster create -p '8081:80@loadbalancer' --k3s-arg '--disable=traefik@server:0'
sleep 1
done

## Install Dapr and init
wget -q https://raw.githubusercontent.com/dapr/cli/master/install/install.sh -O - | /bin/bash
Expand Down

0 comments on commit 3b5c020

Please sign in to comment.