Docker environment for taskwarrior/timewarrior/etc.
So, taskwarrior + timewarrior + bugwarrior and other stuff runs my business. I just do the coding. In 2022, I had to abruptly switch to a backup system. Rather than reinstall everything yet again and migrate the data, I thought I'd dockerize everything.
Build with docker build -t srl295/dock-warrior:dev .
Then run with (script alias recommended!)
$ export DOCK_WARRIOR_CONFIG=/somewhere/config
$ export DOCK_WARRIOR_DATA=/somewhere/data
$ alias dock-warrior="docker run -v ${DOCK_WARRIOR_CONFIG}:/config:ro -v ${DOCK_WARRIOR_DATA}:/data:rw --"
$ alias dock-warrior-task="dock-warrior task"
now if you do dock-warrior-task
it runs task
inside of the container.
The /data
volume has subdirectories for each component:
task/
(this is theTASKDATA
variable)timew/
(this is theTIMEWARRIORDB
variable)
The /config
volume is intended to be mounted readonly, and has subdirectories for each component:
task/
The file /config/task/taskrc
(no initial dot) is used as the TASKRC
timew/
This isn't currently used, because timew keeps the data and config in the same spot.
bugwarrior/bugwarriorrc
Bugwarrior is setup to look for its config file here.
to migrate from a 'desktop' installation:
- create the
data
andconfig
directories - copy
~/.taskrc
toconfig/task/taskrc
- edit
taskrc
to setdata.location=/data/task
- you might want to disable any task hooks for now (TODO)
- copy
~/.task/
directory to becomedata/task/
- copy
~/.timewarrior/
directory to becomedata/timew/
- for now I modified the standard hook to have
'/opt/bin/timew'
as the path instead of'timew'
- TODO need to fix the container's search path
Steven R. Loomis, @srl295 of @codehivetx