version: '2' services: keepass2: image: andrey01/keepass2 network_mode: bridge volumes: - /tmp/.X11-unix:/tmp/.X11-unix - $HOME/Documents:/home/user/private - /etc/localtime:/etc/localtime:ro environment: DISPLAY: unix$DISPLAY cap_add: - IPC_LOCK # lock memory to prevent sensitive values from being swapped to disk.