1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2024-11-28 09:08:36 +02:00

add taskd

This commit is contained in:
kev 2015-06-26 21:49:21 +08:00
parent e64f1c9816
commit 5e9b82270d
3 changed files with 116 additions and 0 deletions

51
taskd/Dockerfile Normal file
View File

@ -0,0 +1,51 @@
#
# Dockerfile for taskd
#
FROM alpine
MAINTAINER kev <noreply@datageek.info>
ENV TASKDDATA /var/taskd
RUN apk add --update build-base \
cmake \
gnutls \
gnutls-dev \
libstdc++ \
&& wget -O- http://downloads.sourceforge.net/project/libuuid/libuuid-1.0.3.tar.gz | tar xz \
&& cd libuuid-1.0.3 \
&& ./configure --prefix=/usr \
&& make install \
&& cd .. \
&& rm -rf libuuid-1.0.3 \
&& wget -O- http://taskwarrior.org/download/taskd-1.1.0.tar.gz | tar xz \
&& cd taskd-1.1.0 \
&& cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr -DCMAKE_BUILD_TYPE=release . \
&& make install \
&& cd pki \
&& ./generate \
&& mkdir -p $TASKDDATA \
&& mv *.pem $TASKDDATA \
&& cd ../.. \
&& rm -rf taskd-1.1.0 \
&& apk del --purge build-base \
cmake \
gnutls-dev \
&& rm -rf /var/cache/apk/*
RUN taskd init \
&& taskd config --force client.cert $TASKDDATA/client.cert.pem \
&& taskd config --force client.key $TASKDDATA/client.key.pem \
&& taskd config --force server.cert $TASKDDATA/server.cert.pem \
&& taskd config --force server.key $TASKDDATA/server.key.pem \
&& taskd config --force server.crl $TASKDDATA/server.crl.pem \
&& taskd config --force ca.cert $TASKDDATA/ca.cert.pem \
&& taskd config --force log $TASKDDATA/taskd.log \
&& taskd config --force pid.file $TASKDDATA/taskd.pid \
&& taskd config --force server 0.0.0.0:53589
VOLUME $TASKDDATA
EXPOSE 53589
CMD taskd server

58
taskd/README.md Normal file
View File

@ -0,0 +1,58 @@
`Taskwarrior` is Free and Open Source Software that manages your TODO list from
your command line. It is flexible, fast, efficient, and unobtrusive. It does
its job then gets out of your way.
## directory tree
```
~/fig/taskd/
├── docker-compose.yml
└── taskd/
   ├── ca.cert.pem
   ├── ca.key.pem
   ├── client.cert.pem
   ├── client.key.pem
   ├── config
   ├── orgs
   │   └── datageek
   │   ├── groups
   │   └── users
   │   └── 77b21131-e4b8-496a-a0e0-eafb75135221
   │   └── config
   ├── server.cert.pem
   ├── server.crl.pem
   └── server.key.pem
```
## docker-compose.yml
```
taskd:
image: vimagick/taskd
ports:
- "53589:53589"
volumes:
- taskd:/var/taskd
restart: always
```
## server
```
$ cd ~/fig/taskd/
$ docker-compose up -d
$ docker exec -it taskd_taskd_1 sh
>>> taskd add org datageek
>>> taskd add user datageek kev
>>> exit
$ tree
```
## client
```
$ brew install task --with-gnutls
$ cd ~/.task
$ scp server:fig/taskd/taskd/{ca-cert,client-cert,client-key}.pem .
$ task sync init
```

7
taskd/docker-compose.yml Normal file
View File

@ -0,0 +1,7 @@
taskd:
image: vimagick/taskd
ports:
- "53589:53589"
volumes:
- taskd:/var/taskd
restart: always