You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test: "initializeCommand" in devcontainer.json #2407
"initializeCommand" in the devcontainer.json is an optional property that can be set to a string (run in a shell) or an array of strings (run without shell). Verify:
This always runs first when starting / connecting to a DevContainer.
Case 1: One of: Single-container (image or Dockerfile) or docker-compose.
Case 2: Repository container when the container does not exist yet or is rebuilt.
Check the command runs before the Docker image is built (note that there is an auxiliary image built first, the command runs only after that, but before the user image is built).
Case 3: Repository container when the container already exists.
The working directory of the command should be the workspace folder. Except with the repository container, the command runs locally on the host OS.
I verified that a config such as "initializeCommand": "yarn" gets run when I open a folder in docker on Windows.
I am not sure I understand the Case 1-2-3 matrix you ask for and I am also not skilled enough in remote containers to know how to set this up (I appreciate how this docs gave me a good step by step description).
Activity
bpasero commentedon Feb 25, 2020
I verified that a config such as
"initializeCommand": "yarn"gets run when I open a folder in docker on Windows.I am not sure I understand the Case 1-2-3 matrix you ask for and I am also not skilled enough in remote containers to know how to set this up (I appreciate how this docs gave me a good step by step description).
Are there docs for how to setup the other cases?
chrmarti commentedon Feb 25, 2020
Benjamin Pasero (@bpasero)
Case 1 is really just https://github.com/microsoft/vscode-remote-containers/blob/master/CONTRIBUTING.md#single-container-with-dockerfile-or-image. It sounds like you already did that.
Case 2 and 3 is https://github.com/microsoft/vscode-remote-containers/blob/master/CONTRIBUTING.md#repository-container with:
Remote-Containers: Show Logto inspect the current log and check your command was run in both cases.bpasero commentedon Feb 25, 2020
Christof Marti (@chrmarti) ok. any reason that command is not in the default commands list?
chrmarti commentedon Feb 25, 2020
Benjamin Pasero (@bpasero) The command is there when you are not connected to a remote already.
mjbvz commentedon Feb 26, 2020
I tested on MacOS. Ran into a few hiccups but seems to work overall
sbatten commentedon Feb 26, 2020
Blocked by the above issue.
egamma commentedon Feb 27, 2020
Verified that the blocking issue on Windows is resolved.
Covered cases 1, 2, 3.