diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 826d3fd38e6c2..357f284a3ada4 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -56,5 +56,6 @@ // See: https://github.com/devcontainers/spec/issues/132 "source=${localEnv:HOME},target=/mnt/home/coder,type=bind,readonly" ], - "postCreateCommand": "./.devcontainer/postCreateCommand.sh" + "postCreateCommand": "./.devcontainer/postCreateCommand.sh", + "postStartCommand": "sudo service docker start" } diff --git a/.devcontainer/postCreateCommand.sh b/.devcontainer/postCreateCommand.sh index bad584e85bea9..8799908311431 100755 --- a/.devcontainer/postCreateCommand.sh +++ b/.devcontainer/postCreateCommand.sh @@ -1,5 +1,9 @@ #!/bin/sh +install_devcontainer_cli() { + npm install -g @devcontainers/cli +} + install_ssh_config() { echo "🔑 Installing SSH configuration..." rsync -a /mnt/home/coder/.ssh/ ~/.ssh/ @@ -49,6 +53,7 @@ personalize() { fi } +install_devcontainer_cli install_ssh_config install_dotfiles personalize