Files
mrvacommander/client/containers/vscode

MRVA VS Code server container

On the host:

Inside the container:

  • Setup inside the container

      cd 
      export PATH=/opt/codeql:$PATH
      codeql pack init qldemo
      cd qldemo
      codeql pack add codeql/python-all@1.0.6
  • Open a new file qldemo/simple.ql and add this this query to it. The plugin will download the CodeQL binaries (but never use them the configuration redirects)

      cd
      cat > qldemo/simple.ql <<eof
      import python
      select 42
      eof
  • Create database.

      cd ~/qldemo
    
      cat > short.py <<EOF
      print('hello world')
      EOF
      export PATH=/opt/codeql:$PATH  
      codeql database create --language=python -s . -v short-db
  • Set the database as default and run the query simple.ql
  • Capture the state of this container and create a new image from it

      docker ps
      docker commit 3802c3e9ad8c code-server-initialized:0.1.24
      # sha256:76cfebdd75a69bcaa8020d06fec52593bd5fde06a100c1962f3201af809bfac0
      docker kill 3802c3e9ad8c
    
      # Make sure the image tag matches the sha
      docker inspect code-server-initialized:0.1.24 |grep Id
      # "Id": "sha256:76cfebdd75a69bcaa8020d06fec52593bd5fde06a100c1962f3201af809bfac0",
    
      # Run the image and check
      docker run -d -p 9080:9080 code-server-initialized:0.1.24
  • Push this container

      make csi-push
  • Test the registry image

      make csi-test