diff --git a/.gitignore b/.gitignore index 6129f26..9e4c5bc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,3 @@ .gitmodules /test/libs/* -/src/logs/* \ No newline at end of file +/src/logs/*!/Dockerfile diff --git a/Dockerfile b/Dockerfile index f33783b..dc85c89 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,9 @@ FROM ubuntu:22.04 WORKDIR /Taskwarrior-installation COPY . . -RUN apt-get update && apt-get -y install sudo && apt-get install -y git +RUN apt-get update && apt-get -y install apt-utils && apt-get -y install sudo && apt-get install -y git RUN ln -snf /usr/share/zoneinfo/$CONTAINER_TIMEZONE /etc/localtime && echo $CONTAINER_TIMEZONE > /etc/timezone -RUN chmod +x tw-install.sh && ./tw-install.sh \ No newline at end of file +RUN chmod +x tw-install.sh && ./tw-install.sh +ARG TASKDDATA +ENV TASKDDATA ${TASKDDATA:-/var/taskd} +ENTRYPOINT taskd server --data ${TASKDDATA} \ No newline at end of file diff --git a/README.md b/README.md index 8327e13..a5eadb3 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,20 @@ chmod +x tw-uninstall.sh (Currently) you have to reboot the system before you install it again using the `tw-install.sh` file. ## Docker (not working) -A short headsup, the `docker build .` is currently not working as kindly pointed out [here](https://github.com/HiveMinds/tw-install/issues/102) +### Build +```shell +docker build -t tw-install . +``` +### Run container +```shell +docker run \ +-p 53589:53589 \ +-e TW_USERNAME=First \ +-e TW_ORGANISATION=Public \ +--name tw-instance \ +-d \ +tw-install +``` ## How to use (for developers) First install the required submodules with: diff --git a/tw-install.sh b/tw-install.sh index 1b856d4..eca30d5 100755 --- a/tw-install.sh +++ b/tw-install.sh @@ -53,6 +53,8 @@ yes | sudo apt install libgnutls28-dev yes | sudo apt install uuid-dev yes | sudo apt install cmake yes | sudo apt install gnutls-bin +yes | sudo apt install cron + # install taskwarrior and add first task yes | sudo apt install taskwarrior