version: "3.4"
services:
  notebook:
    build:
      context: docker_notebook
    environment:
      - XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR}
      - USER=${USER}
      - UID=21702
      - DISPLAY=${DISPLAY}
      - XAUTHORITY=${XAUTHORITY}
      - XAUTHLOCALHOSTNAME=${XAUTHLOCALHOSTNAME}
      - JUPYTER_CREDENTIALS=${JUPYTER_CREDENTIALS}
    hostname: ${XAUTHLOCALHOSTNAME}
    volumes:
      - ${HOME}/.Xauthority:${HOME}/.Xauthority
      - ${XDG_RUNTIME_DIR}:${XDG_RUNTIME_DIR}
      - /etc/machine-id:/etc/machine-id
      - /tmp/.X11-unix:/tmp/.X11-unix
      - ./:${HOME}/prednasky
      - ${HOME}/.gitconfig:${HOME}/.gitconfig-base
    ports:
      - 127.0.0.1:8888:8888
    privileged: False
    tty: True
