version: "3.7"

services:
  vscode:
    build: .
    volumes:
      - ../:/workspace
      # Docker socket to access Docker server
      - /var/run/docker.sock:/var/run/docker.sock
      # SSH directory for Linux, OSX and WSL
      # On Linux and OSX, a symlink /mnt/ssh <-> ~/.ssh is
      # created in the container. On Windows, files are copied
      # from /mnt/ssh to ~/.ssh to fix permissions.
      - ~/.ssh:/mnt/ssh
      # Shell history persistence
      - ~/.zsh_history:/root/.zsh_history
      # Git config
      - ~/.gitconfig:/root/.gitconfig
    environment:
      - TZ=
    cap_add:
      # For debugging with dlv
      - SYS_PTRACE
      - NET_ADMIN
    security_opt:
      # For debugging with dlv
      - seccomp:unconfined
    entrypoint: [ "zsh", "-c", "while sleep 1000; do :; done" ]
