Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99131

VS Code Remote Development: Container postCreateCommand doesn't run

$
0
0

I'm trying to configure SSH authentication for a remote development workspace, as detailed in the documentation:

{
  "dockerfile": "Dockerfile",
  "runArgs": [
    // ...
    "-v",
    "${env:HOME}${env:USERPROFILE}/.ssh:/root/.ssh-localhost:ro"
  ],
  "postCreateCommand": "echo \"copying ssh keys...\"&& mkdir -p ~/.ssh && cp -r ~/.ssh-localhost/* ~/.ssh && chmod 700 ~/.ssh && chmod 600 ~/.ssh/*",
  extensions: [
    // ...
  ]
}

Note that I've added an echo statement at the beginning of that line, just to make sure I'd know if it runs. Other than that, it's identical to the documentation.

However, it seems that the postCreateCommand is never run. If I look at the Dev Containers terminal output I see neither the expected docker exec command nor the copying ssh keys... output from my echo statement, and ls -a /rootfrom inside the container shows the .ssh-localhost folder, but not .ssh.

I see no error messages in the logs either. I've tried triggering "Remote Development: Rebuild Container" as well as deleting both container and image before reloading the window, but get the same result anyway.

What configuration am I missing here?


Viewing all articles
Browse latest Browse all 99131

Trending Articles