2023-03-28 12:21:17 +00:00
|
|
|
---
|
|
|
|
title: Docker
|
|
|
|
description: A guide for running Conky with Docker
|
|
|
|
indexWeight: 0
|
|
|
|
---
|
|
|
|
|
|
|
|
## Getting the image
|
|
|
|
|
|
|
|
Build the image with:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker build --tag=conky .
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
or if you want the commandline version:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker build --build-arg X11=no --tag=conkycmd .
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Running the container
|
|
|
|
|
|
|
|
After building you can run the graphical version with:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker run --rm -ti --net=host -e DISPLAY -v ~/.Xauthority:/root/.Xauthority conky
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
The commandline version is easier:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker run --rm -ti conkycmd
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
If you want to pass some options to conky you can just add them if you mention
|
|
|
|
'conky' twice. Once for the image and once for the command. For example:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker run --rm -ti --net=host -e DISPLAY -v ~/.Xauthority:/root/.Xauthority conky conky --version
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
will show you the version of conky. Since you don't need X for this you could also do:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker run --rm -ti conkycmd conky --version
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
If you want to fiddle around a bit with the configuration first you could do:
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
docker run --rm -ti --net=host -e DISPLAY -v ~/.Xauthority:/root/.Xauthority conky bash
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
_change things is in the configuration_
|
|
|
|
|
|
|
|
```shell-session
|
2023-06-24 18:34:22 +00:00
|
|
|
conky -c configurationfile ; exit
|
2023-03-28 12:21:17 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
See the docker docs to a lot of other ways to (ab)use this container
|
|
|
|
|
|
|
|
## Why?
|
|
|
|
|
|
|
|
Disadvantages of using the docker:
|
|
|
|
|
|
|
|
- You'll have to install docker.
|
|
|
|
This can be done by following the instructions in
|
|
|
|
https://docs.docker.com/install/ to install docker CE. But just using the
|
|
|
|
packagemanager of your distro like you would do with other software will work.
|
|
|
|
- A lot of info will be about the current container instead of the whole system
|
|
|
|
- At the moment our docker image is still in development fase.
|
|
|
|
|
|
|
|
Advantages of using docker:
|
|
|
|
|
|
|
|
- During the installation you won't have to care about which compilers,
|
|
|
|
libraries, ... are installed. Neither should you care about how to use them.
|
|
|
|
- The containerization of conky will make it a lot harder to let problems with
|
|
|
|
conky affect the rest of the system.
|
|
|
|
- Your Conky will run in exactly the same environment as everyone else's, so
|
|
|
|
if it works for someone it will work for everyone. No matter which distro you
|
|
|
|
are using or how you configured that distro. (The conky configuration itself
|
|
|
|
will matter and also the version of conky)
|
|
|
|
- Problems will be easier to recreate by developers causing faster debugging.
|