Skip to content

VS Code

Nils Wogatzky edited this page Apr 16, 2018 · 1 revision

I used this configuration to try vscode on some go project. If you are not working with go you can skip the go-related parts of the configuration.

Version="1"
    [[command]]
      name = "vscode"  
      image ="vscode"
      addGroups = true   
      impersonate = true
      workDir = "/go"  
      removeContainer=true
      isInteractive=false
      RequireEnvVars=true
      entrypoint="/usr/share/code/code"
      volumes = [
          "/tmp/.X11-unix:/tmp/.X11-unix",
          "${SSH_AUTH_SOCK}:/run/ssh.sock",
          "/etc/passwd:/etc/passwd:ro",
          "/etc/group:/etc/group:ro",
          "/run/docker.sock:/run/docker.sock",
          "${GOPATH}:/go",
          "${HOME}/.vscode:/home/user/.vscode"
      ]
      envvars = [
          "HOME:${HOME}",
          "SSH_AUTH_SOCK:/run/ssh.sock",
          "DOCKER_HOST=unix:///run/docker.sock",
          "DISPLAY=unix${DISPLAY}"
      ]
      additionalArgs=[
        "--device /dev/dri"
      ]

If you are interested in how to a create docker image containing vs code, take a look at Jess Frazelles Repo:
https://github.com/jessfraz/dockerfiles

Clone this wiki locally