version: '2' services: keepass2: image: local/keepass2 build: . 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.