mirror of
https://github.com/nicolargo/glances.git
synced 2025-12-23 22:18:31 -05:00
added commented out by default mount point for /etc/os-release. without it Glances container shows distibution information from container itself and not host system.
37 lines
1.1 KiB
YAML
37 lines
1.1 KiB
YAML
version: '3.9'
|
|
services:
|
|
glances:
|
|
build:
|
|
context: ./
|
|
dockerfile: Dockerfile
|
|
restart: always
|
|
pid: "host"
|
|
privileged: true
|
|
network_mode: "host"
|
|
volumes:
|
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
|
- "/run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro"
|
|
- "./glances.conf:/glances/conf/glances.conf"
|
|
# # Uncomment for proper distro information in upper panel.
|
|
# # Works only for distros that do have this file (most of distros do).
|
|
# - "/etc/os-release:/etc/os-release:ro"
|
|
environment:
|
|
- TZ=${TZ}
|
|
- GLANCES_OPT=-C /glances/conf/glances.conf -w
|
|
# # Uncomment for GPU compatibility (Nvidia) inside the container
|
|
# deploy:
|
|
# resources:
|
|
# reservations:
|
|
# devices:
|
|
# - driver: nvidia
|
|
# count: 1
|
|
# capabilities: [gpu]
|
|
# # Uncomment to protect Glances WebUI by a login/password (add --password to GLANCES_OPT)
|
|
# secrets:
|
|
# - source: glances_password
|
|
# target: /root/.config/glances/<login>.pwd
|
|
|
|
# secrets:
|
|
# glances_password:
|
|
# file: ./secrets/glances_password
|