diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 7ee9ac38d1..a0ff582e68 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -5,7 +5,7 @@ }, "postCreateCommand": ".devcontainer/container_post_create.sh", "postStartCommand": ".devcontainer/container_post_start.sh", - "initializeCommand": ".devcontainer/host_setup.sh", + "initializeCommand": [".devcontainer/host_setup"], "privileged": true, "containerEnv": { "DISPLAY": "${localEnv:DISPLAY}", diff --git a/.devcontainer/host_setup.sh b/.devcontainer/host_setup similarity index 100% rename from .devcontainer/host_setup.sh rename to .devcontainer/host_setup diff --git a/.devcontainer/host_setup.cmd b/.devcontainer/host_setup.cmd new file mode 100644 index 0000000000..885bd27f25 --- /dev/null +++ b/.devcontainer/host_setup.cmd @@ -0,0 +1,10 @@ +:: pull base image +IF NOT DEFINED USE_LOCAL_IMAGE ^ +echo "Updating openpilot_base image if needed..." && ^ +docker pull ghcr.io/commaai/openpilot-base:latest + +:: setup .host dir +mkdir .devcontainer\.host + +:: setup host env file +echo "" > .devcontainer\.host\.env \ No newline at end of file