mirror of
https://github.com/nicolargo/glances.git
synced 2024-12-24 01:35:23 +03:00
Improve Makefile amd docker-compose to support Podman and GPU
This commit is contained in:
parent
67503f30a9
commit
ac7f674f55
12
Makefile
12
Makefile
@ -162,22 +162,22 @@ run-local-conf: ## Start Glances in console mode with the system conf file
|
||||
./venv/bin/python -m glances
|
||||
|
||||
run-docker-alpine-minimal: ## Start Glances Alpine Docker minimal in console mode
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-minimal
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-minimal
|
||||
|
||||
run-docker-alpine-full: ## Start Glances Alpine Docker full in console mode
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-full
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-full
|
||||
|
||||
run-docker-alpine-dev: ## Start Glances Alpine Docker dev in console mode
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-dev
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-alpine-dev
|
||||
|
||||
run-docker-ubuntu-minimal: ## Start Glances Ubuntu Docker minimal in console mode
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-minimal
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-minimal
|
||||
|
||||
run-docker-ubuntu-full: ## Start Glances Ubuntu Docker full in console mode
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-full
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-full
|
||||
|
||||
run-docker-ubuntu-dev: ## Start Glances Ubuntu Docker dev in console mode
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-dev
|
||||
docker run --rm -e TZ="${TZ}" -e GLANCES_OPT="" -v /run/user/1000/podman/podman.sock:/run/user/1000/podman/podman.sock:ro -v /var/run/docker.sock:/var/run/docker.sock:ro --pid host --network host -it glances:local-ubuntu-dev
|
||||
|
||||
run-webserver: ## Start Glances in Web server mode
|
||||
./venv/bin/python -m glances -C ./conf/glances.conf -w
|
||||
|
@ -22,10 +22,18 @@ services:
|
||||
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"
|
||||
environment:
|
||||
- GLANCES_OPT: "-C /glances/conf/glances.conf -w"
|
||||
- TZ: "${TZ}"
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
||||
labels:
|
||||
- "traefik.port=61208"
|
||||
- "traefik.frontend.rule=Host:glances.docker.localhost"
|
||||
|
@ -10,7 +10,15 @@ services:
|
||||
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"
|
||||
environment:
|
||||
- GLANCES_OPT: "-C /glances/conf/glances.conf -w"
|
||||
- TZ: "${TZ}"
|
||||
deploy:
|
||||
resources:
|
||||
reservations:
|
||||
devices:
|
||||
- driver: nvidia
|
||||
count: 1
|
||||
capabilities: [gpu]
|
Loading…
Reference in New Issue
Block a user